60 lines
2.8 KiB
Makefile
Executable file
60 lines
2.8 KiB
Makefile
Executable file
#!/usr/bin/make -f
|
|
#
|
|
# debian/rules
|
|
# Copyright (C) 2010 Pali Rohár <pali.rohar@gmail.com>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
#
|
|
|
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
|
|
clean::
|
|
$(MAKE) distclean
|
|
$(RM) stratagus-dbg
|
|
|
|
build:
|
|
./autogen.sh
|
|
./configure --prefix=/usr --datadir=/usr/share/games/stratagus/default
|
|
$(MAKE) OUTFILE=stratagus
|
|
$(MAKE) clean
|
|
./configure --prefix=/usr --datadir=/usr/share/games/stratagus/default --enable-debug
|
|
$(MAKE) OUTFILE=stratagus-dbg
|
|
|
|
install/stratagus::
|
|
install -m0755 stratagus $(CURDIR)/debian/stratagus/usr/games/
|
|
convert $(CURDIR)/contrib/stratagus.ico $(CURDIR)/debian/stratagus/usr/share/pixmaps/stratagus.png
|
|
|
|
install/stratagus-dbg::
|
|
install -m0755 stratagus-dbg $(CURDIR)/debian/stratagus-dbg/usr/games/
|
|
|
|
binary-predeb/stratagus::
|
|
if [ -f /etc/maemo_version ]; then \
|
|
mkdir -p $(CURDIR)/debian/stratagus/opt/stratagus/bin; \
|
|
mkdir -p $(CURDIR)/debian/stratagus/opt/stratagus/share/doc; \
|
|
mkdir -p $(CURDIR)/debian/stratagus/opt/man/man6; \
|
|
mv $(CURDIR)/debian/stratagus/usr/games/stratagus $(CURDIR)/debian/stratagus/opt/stratagus/bin/; \
|
|
mv $(CURDIR)/debian/stratagus/usr/share/doc/stratagus $(CURDIR)/debian/stratagus/opt/stratagus/share/doc/; \
|
|
mv $(CURDIR)/debian/stratagus/usr/share/man/man6/stratagus.6.gz $(CURDIR)/debian/stratagus/opt/man/man6/; \
|
|
ln -s /opt/stratagus/bin/stratagus $(CURDIR)/debian/stratagus/usr/games/stratagus; \
|
|
ln -s /opt/stratagus/share/doc/stratagus/ $(CURDIR)/debian/stratagus/usr/share/doc/stratagus; \
|
|
ln -s /opt/stratagus/share/man/stratagus.6.gz $(CURDIR)/debian/stratagus/usr/share/man/man6/stratagus.6.gz; \
|
|
sed "s/Section: .*/Section: user\/games/" -i $(CURDIR)/debian/stratagus/DEBIAN/control; \
|
|
echo "Bugtracker: https://bugs.launchpad.net/stratagus" >> $(CURDIR)/debian/stratagus/DEBIAN/control; \
|
|
echo "Maemo-Display-Name: Stratagus" >> $(CURDIR)/debian/stratagus/DEBIAN/control; \
|
|
echo "Maemo-Icon-26:" >> $(CURDIR)/debian/stratagus/DEBIAN/control; \
|
|
for line in $(shell convert $(CURDIR)/contrib/stratagus.ico -resize 48x48 png:- | uuencode -m - | tail -n +2 | head -n -1); do \
|
|
echo " $$line" >> $(CURDIR)/debian/stratagus/DEBIAN/control; \
|
|
done; \
|
|
fi
|