X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Frules;h=faeac03f63d8edb515fbeecb7c6e58dd67ff0b03;hb=fb8f18f4a98669c3b85e1bd7920fbabfc00b886e;hp=f2401f75f09e8ddeba572d3061c90bca80ee5d40;hpb=f859c23a77b93368b96630b4b0ff79f039b87a2f;p=debhelper.git diff --git a/debian/rules b/debian/rules index f2401f7..faeac03 100755 --- a/debian/rules +++ b/debian/rules @@ -1,106 +1,14 @@ #!/usr/bin/make -f -# This is _not_ a good example of a debhelper rules file. -# See examples/ for some good examples. +# If you're looking for an example debian/rules that uses debhelper, see +# the examples directory. +# +# Each debhelper command in this rules file has to be run using ./run, +# to ensure that the commands and libraries in the source tree are used, +# rather than the installed ones. -# This generates a list of synopses of debhelper commands, and substitutes -# it in to the #LIST# line on the man page fed to it on stdin. Must be passed -# parameters of all the executables or pod files to get the synopses from. -# (Like I said, this is not a good example of a debhelper rules file..) -# For correct conversion of pod tags (like S< >) #LIST# must be substituted in -# the pod file and not in the troff file. -MAKEMANLIST=perl -e ' \ - undef $$/; \ - foreach (@ARGV) { \ - open (IN, $$_) or die "$$_: $$!"; \ - $$file=; \ - close IN; \ - if ($$file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { \ - $$collect.="=item $$1(1)\n\n$$2\n\n"; \ - } \ - } \ - END { \ - while () { \ - s/\#LIST\#/$$collect/; \ - print; \ - }; \ - }' - -# Figure out the `current debhelper version. -VERSION=$(shell expr "`dpkg-parsechangelog |grep Version:`" : '.*Version: \(.*\)') - -PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}') - -POD2MAN=pod2man -c Debhelper -r "$(VERSION)" - -# l10n to be built is determined from .po files -LANGS=$(notdir $(basename $(wildcard man/po4a/po/*.po))) - -version: - printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \ - Debian/Debhelper/Dh_Version.pm - -build: version test build-stamp -build-stamp: - find . -maxdepth 1 -type f -perm +100 -name "dh_*" \ - -exec $(POD2MAN) {} {}.1 \; - cat debhelper.pod | \ - $(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` | \ - $(POD2MAN) --name="debhelper" --section=7 > debhelper.7 - po4a man/po4a/po4a.cfg - set -e; \ - for lang in $(LANGS); do \ - dir=man/$$lang; \ - for file in $$dir/dh_*.pod; do \ - prog=`basename $$file | sed 's/.pod//'`; \ - $(POD2MAN) $$file $$prog.$$lang.1; \ - done; \ - cat $$dir/debhelper.pod | \ - $(MAKEMANLIST) `find $$dir -type f -maxdepth 1 -name "dh_*.pod" | sort` | \ - $(POD2MAN) --section=7 > debhelper.$$lang.7; \ - done - - touch build-stamp - -clean: - ./run dh_testdir - ./run dh_testroot - ./run dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm - po4a --rm-translations --rm-backups man/po4a/po4a.cfg - for lang in $(LANGS); do \ - if [ -e man/$$lang ]; then rmdir man/$$lang; fi; \ - done; - -test: version test-stamp -test-stamp: - ./run dh_clean - ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/* - ./run dh_clean - touch test-stamp - -binary-indep: build - ./run dh_testdir - ./run dh_testroot - ./run dh_clean -k - ./run dh_install -X .1 dh_* usr/bin - ./run dh_install Debian/Debhelper/*.pm $(PERLLIBDIR)/Debian/Debhelper/ - ./run dh_install autoscripts usr/share/debhelper - ./run dh_installdocs doc/* - ./run dh_installexamples examples/* - ./run dh_installman *.1 *.7 - ./run dh_installchangelogs - ./run dh_link - ./run dh_compress - ./run dh_fixperms - ./run dh_perl - ./run dh_installdeb - ./run dh_gencontrol - ./run dh_md5sums - ./run dh_builddeb +%: + ./run dh $@ # Not intended for use by anyone except the author. announcedir: @echo ${HOME}/src/joeywiki/code/debhelper/news - -binary-arch: -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary