4 DEBIAN_REVISION
="$$(dpkg-parsechangelog | sed 's/^Version: [^-]*-//; t; d')" && \
5 [ -n
"$$DEBIAN_REVISION" ] && \
6 make
"VER=$$(cat version.def) -DDEBIAN_REVISION=\"\\\"$$DEBIAN_REVISION\\\"\""
9 # We patch these sources and so must rebuild the Makefile.
10 Makefile
: mkfiles.pl Recipe
13 binary
: binary-arch binary-indep
17 mkdir
-p debian
/sgt-puzzles
/usr
/games
18 make DESTDIR
=debian
/sgt-puzzles
install
21 mkdir
-p debian
/sgt-puzzles
/usr
/share
/doc
/sgt-puzzles
22 cat debian
/copyright-prefix LICENCE \
23 > debian
/sgt-puzzles
/usr
/share
/doc
/sgt-puzzles
/copyright
26 mkdir
-p debian
/sgt-puzzles
/usr
/share
/man
/man6
27 install -m644
*.6 debian
/sgt-puzzles
/usr
/share
/man
/man6
39 dh_clean
*.6 debian
/substvars
41 # The canonical source location is
42 # http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz
43 # but this redirects to puzzles-$version.tar.gz. We get the version
44 # number (really a Subversion revision number) by scanning wget's
47 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') && \
48 [ -n
"$$revision" ] && \
49 echo
"Creating sgt-puzzles_$$revision.orig.tar.gz" && \
50 tar xzf puzzles-r
$$revision.
tar.gz
&& \
51 mv puzzles-r
$$revision sgt-puzzles-
$$revision.orig
&& \
52 tar cf
- sgt-puzzles-
$$revision.orig | gzip
-c
-9 \
53 > sgt-puzzles_
$$revision.orig.
tar.gz
&& \
54 rm -rf puzzles-r
$$revision.
tar.gz sgt-puzzles-
$$revision.orig
57 dir=$$(basename $$PWD) && \
59 dpkg-source
-b
-i
'(^|/)(Makefile|puzzles\.(cnt|hlp|txt))$$' $$dir