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.pm and the current Dh_getopt.pm 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 *.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
55 # Install in the proper location on my ftp server and web server. Not intended
56 # for use by anyone except the author.
57 OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'<debian/changelog)
59 dpkg-buildpackage -rfakeroot -tc
60 if [ `hostname` = 'kite' ] ; then \
61 cp ../debhelper_$(VERSION).tar.gz ../../public; \
62 rm /home/ftp/pub/code/debhelper/* || true; \
63 cp debian/changelog /home/pub/programs/debhelper/CHANGES; \
64 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS; \
65 cd ..; rm -rf debhelper-$(OLD_VER); \
66 [ -f ../public/debhelper_$(OLD_VER).tar.gz ] && \
67 tar zxf ../public/debhelper_$(OLD_VER).tar.gz || \
68 tar zxf ../outdated/debhelper_$(OLD_VER).tar.gz; \
69 diff -r -u --new-file debhelper-$(OLD_VER) debhelper-$(VERSION) > \
70 /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
71 gzip -9f /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
72 cd /tmp; rm -f debhelper-$(OLD-VER); \
75 binary: binary-indep binary-arch
76 .PHONY: build clean binary-indep binary-arch binary localdist