2 # Note that I have to refer to debhelper programs with ./, to make sure
3 # I run the most current ones. That's also why there is a symlink to the
4 # current dh_lib and the current dh_getopt.pl in this debian/ directory.
6 # If any automatic script generation is done in building this package,
7 # be sure to use the new templates from this package.
8 export DH_AUTOSCRIPTDIR=autoscripts
10 # Figure out the current debhelper version.
11 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
23 # Build architecture-dependent files here.
27 # Build architecture-independent files here.
32 ./dh_installdirs usr/bin usr/lib/debhelper
34 echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > debian/tmp/usr/lib/debhelper/Dh_Version.pm
35 find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
36 -exec install -p {} debian/tmp/usr/bin \;
37 cp -a dh_lib dh_getopt.pl *.pm debian/tmp/usr/lib/debhelper
38 cp -a autoscripts debian/tmp/usr/lib/debhelper
40 ./dh_installdocs doc/TODO doc/README doc/PROGRAMMING doc/from-debstd
41 ./dh_installexamples examples/*
44 ./dh_installchangelogs
54 # Install in the proper location on my ftp server and web server. Not intended
55 # for use by anyone except the author.
56 OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'<debian/changelog)
58 dpkg-buildpackage -rfakeroot -tc
59 if [ `hostname` = 'kite' ] ; then \
60 cp ../debhelper_$(VERSION).tar.gz ../../public; \
61 rm /home/ftp/pub/code/debhelper/* || true; \
62 cp debian/changelog /home/pub/programs/debhelper/CHANGES; \
63 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS; \
64 cd ..; rm -rf debhelper-$(OLD_VER); \
65 [ -f ../public/debhelper_$(OLD_VER).tar.gz ] && \
66 tar zxf ../public/debhelper_$(OLD_VER).tar.gz || \
67 tar zxf ../outdated/debhelper_$(OLD_VER).tar.gz; \
68 diff -r -u --new-file debhelper-$(OLD_VER) debhelper-$(VERSION) > \
69 /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
70 gzip -9f /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
71 cd /tmp; rm -f debhelper-$(OLD-VER); \
74 binary: binary-indep binary-arch
75 .PHONY: build clean binary-indep binary-arch binary localdist