2 # Note that I have to refer to debhelper programs with ./, to make sure
3 # I run the most current ones.
5 # This is _not_ a good example of a debhelper rules file, but I didn't need
6 # to tell you that; just see the 25 lines of inlined perl below..
7 # See examples/ for some good examples.
9 # Ensure that builds are self-hosting, which means I have to use the .pm
10 # files in this package, not any that may be on the system.
13 # If any automatic script generation is done in building this package,
14 # be sure to use the new templates from this package.
15 export DH_AUTOSCRIPTDIR=autoscripts
17 # Living dangerously :-)
20 # Figure out the current debhelper version.
21 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
36 DH_VERSION=10 perl -MTest::Harness -e 'runtests grep { ! /CVS/ } @ARGV' t/*
39 # Build architecture-dependent files here.
43 # Build architecture-independent files here.
48 ./dh_installdirs usr/bin usr/share/debhelper \
49 usr/lib/perl5/Debian/Debhelper
51 echo -e "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
52 debian/debhelper/usr/lib/perl5/Debian/Debhelper/Dh_Version.pm
53 find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
54 -exec install -p {} debian/debhelper/usr/bin \;
55 cp -a Debian/Debhelper/*.pm \
56 debian/debhelper/usr/lib/perl5/Debian/Debhelper/
57 cp -a autoscripts debian/debhelper/usr/share/debhelper
58 rm -rf debian/debhelper/usr/share/debhelper/autoscripts/CVS
60 ./dh_installdocs `find doc -type f | grep -v CVS`
61 ./dh_installexamples `find examples -type f | grep -v CVS`
65 # Fix up all man pages, filling in the modification time for them.
66 # Note this runs before the command below so debhelper.1 gets the right
69 foreach $$f (@ARGV) { \
71 $$date=POSIX::strftime("%d %B %Y",localtime($$data[9])); \
75 $$lines[0]=~s/1 ""/1 "$$date"/; \
79 }' debian/debhelper/usr/share/man/man1/*.1
80 # Fix up the debhelper.1 man page, substituting in a list of all
81 # debhelper commands. Eek!
84 $$collect.=".TP\n.BR $$_" if $$. eq 3 && /^dh_/; \
87 open(I,"debian/debhelper/usr/share/man/man1/debhelper.1"); \
90 open(O,">debian/debhelper/usr/share/man/man1/debhelper.1"); \
92 s/#LIST#/$$collect/; \
97 ./dh_installchangelogs
107 # Update the debhelper web page. Not intended for use by anyone except the
110 cp debian/changelog /home/pub/programs/debhelper/CHANGES
111 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS
113 binary: binary-indep binary-arch
114 .PHONY: build clean binary-indep binary-arch binary dist