1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/make -f
# Hack to work around a code generation bug in gcc 4.1 (#380541 causing
# #380455).
CC=gcc-3.3
build : Makefile
DEBIAN_REVISION="$$(dpkg-parsechangelog | sed 's/^Version: [^-]*-//; t; d')" && \
[ -n "$$DEBIAN_REVISION" ] && \
make "VER=$$(cat version.def) -DDEBIAN_REVISION=\"\\\"$$DEBIAN_REVISION\\\"\"" \
"CC=$(CC)" \
"CFLAGS=-O2 -Wall -g -DUSE_GNOME_HELP -DPATH_PREFIX=\"\\\"/usr\\\"\" $$(pkg-config gtk+-2.0 --cflags) $$(pkg-config libgnome-2.0 --cflags)" \
"XLDFLAGS=$$(pkg-config gtk+-2.0 --libs) $$(pkg-config libgnome-2.0 --libs)"
make -f Makefile.doc
# We patch these sources and so must rebuild the Makefile.
Makefile : mkfiles.pl Recipe
./mkfiles.pl
binary : binary-arch binary-indep
binary-arch : build
dh_testroot
mkdir -p -m755 debian/sgt-puzzles/usr/games
make DESTDIR=debian/sgt-puzzles install
dh_strip
dh_shlibdeps
mkdir -p -m755 \
debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/C
install -m644 *.html \
debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/C
ln -s . \
debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/sgt-puzzles
mkdir -p -m755 debian/sgt-puzzles/usr/share/doc/sgt-puzzles
cat debian/copyright-prefix LICENCE \
> debian/sgt-puzzles/usr/share/doc/sgt-puzzles/copyright
ln -sf ../../sgt-puzzles/gnome/help/C \
debian/sgt-puzzles/usr/share/doc/sgt-puzzles/html
dh_installchangelogs
dh_installdocs
mkdir -p -m755 debian/sgt-puzzles/usr/share/man/man6
install -m644 *.6 debian/sgt-puzzles/usr/share/man/man6
dh_compress
dh_fixperms
dh_installmenu
dh_installdeb
dh_gencontrol
dh_builddeb
binary-indep :
clean : Makefile
make clean
make -f Makefile.doc clean
dh_clean Makefile Makefile.cyg Makefile.osx Makefile.vc debian/substvars
# The canonical source location is
# http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz
# but this redirects to puzzles-$version.tar.gz. We get the version
# number (really a Subversion revision number) by scanning wget's
# output.
get-orig-source :
revision=$$(wget http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz 2>&1 | sed 's/^ *=> `puzzles-r\([0-9]*\)\.tar\.gz'\''$$/\1/; t; d') && \
[ -n "$$revision" ] && \
echo "Creating sgt-puzzles_$$revision.orig.tar.gz" && \
mv puzzles-r$$revision.tar.gz sgt-puzzles_$$revision.orig.tar.gz
.PHONY : build binary binary-arch binary-dep clean get-orig-source
|