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 # If any automatic script generation is done in building this package,
10 # be sure to use the new templates from this package.
11 export DH_AUTOSCRIPTDIR=autoscripts
13 # Living dangerously :-)
16 # Figure out the current debhelper version.
17 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
21 build: link-stamp test
31 DH_VERSION=10 perl -MTest::Harness -e 'runtests grep { ! /CVS/ } @ARGV' t/*
34 # Build architecture-dependent files here.
35 binary-arch: link-stamp build
38 # Build architecture-independent files here.
39 binary-indep: link-stamp build
43 ./dh_installdirs usr/bin usr/share/debhelper \
44 usr/lib/perl5/Debian/Debhelper
46 echo -e "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
47 debian/debhelper/usr/lib/perl5/Debian/Debhelper/Dh_Version.pm
48 find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
49 -exec install -p {} debian/debhelper/usr/bin \;
50 cp -a Debian/Debhelper/*.pm \
51 debian/debhelper/usr/lib/perl5/Debian/Debhelper/
52 cp -a autoscripts debian/debhelper/usr/share/debhelper
53 rm -rf debian/debhelper/usr/share/debhelper/autoscripts/CVS
55 ./dh_installdocs `find doc -type f | grep -v CVS`
56 ./dh_installexamples `find examples -type f | grep -v CVS`
60 # Fix up all man pages, filling in the modification time for them.
61 # Note this runs beofre the command below so debhelper.1 gets the right
64 foreach $$f (@ARGV) { \
66 $$date=POSIX::strftime("%d %B %Y",localtime($$data[9])); \
70 $$lines[0]=~s/1 ""/1 "$$date"/; \
74 }' debian/debhelper/usr/share/man/man1/*.1
75 # Fix up the debhelper.1 man page, substituting in a list of all
76 # debhelper commands. eek!
79 $$collect.=".TP\n.BR $$_" if $$. eq 3 && /^dh_/; \
82 open(I,"debian/debhelper/usr/share/man/man1/debhelper.1"); \
85 open(O,">debian/debhelper/usr/share/man/man1/debhelper.1"); \
87 s/#LIST#/$$collect/; \
92 ./dh_installchangelogs
103 # Fix links when checking out of cvs by calling this target.
105 sh -e debian/fixlinks
108 # Update the debhelper web page. Not intended for use by anyone except the
111 cp debian/changelog /home/pub/programs/debhelper/CHANGES
112 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS
114 binary: binary-indep binary-arch
115 .PHONY: build clean binary-indep binary-arch binary dist