2 # This is _not_ a good example of a debhelper rules file.
3 # See examples/ for some good examples.
5 # This generates a list of synopses of debhelper commands, and substitutes
6 # it in to the #LIST# line on the man page fed to it on stdin. Must be passed
7 # parameters of all the executables or pod files to get the synopses from.
8 # (Like I said, this is not a good example of a debhelper rules file..)
9 MAKEMANLIST=perl -e ' \
12 open (IN, $$_) or die "$$_: $$!"; \
15 if ($$file=~m/=head1 .*\n\n(.*?) - (.*?)\n/m) { \
16 $$collect.=".IP $$1(1)\n$$2\n"; \
21 s/\#LIST\#/$$collect/; \
26 # Figure out the `current debhelper version.
27 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
29 PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}')
31 POD2MAN=pod2man -c Debhelper -r "$(VERSION)"
33 build: test build-stamp
35 # Build all the man pages.
36 find . -maxdepth 1 -type f -perm +100 -name "dh_*" \
37 -exec $(POD2MAN) {} {}.1 \;
38 $(POD2MAN) --section=7 debhelper.pod | \
39 $(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` > debhelper.7
42 for dir in man/*; do \
43 lang=`basename $$dir`; \
44 for file in $$dir/dh_*.pod; do \
45 prog=`basename $$file | sed 's/.pod//'`; \
46 $(POD2MAN) $$file $$prog.$$lang.1; \
48 $(POD2MAN) --section=7 $$dir/debhelper.pod | \
49 $(MAKEMANLIST) `find $$dir -type f -maxdepth 1 -name "dh_*.pod" | sort` > debhelper.$$lang.7; \
52 printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
53 Debian/Debhelper/Dh_Version.pm
59 ./run dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
64 ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/*
72 ./run dh_install -X .1 dh_* usr/bin
73 ./run dh_install Debian/Debhelper/*.pm $(PERLLIBDIR)/Debian/Debhelper/
74 ./run dh_install autoscripts usr/share/debhelper
75 ./run dh_installdocs doc/*
76 ./run dh_installexamples examples/*
77 ./run dh_installman *.1 *.7
78 ./run dh_installchangelogs
89 # Update the debhelper web page. Not intended for use by anyone except the
91 DIR=/home/web/kitenet.net/programs/debhelper
93 cp debian/changelog $(DIR)/CHANGES
94 echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary