From ccbd3d9f501bc8d31e9fa82d04e4989f7e43c2a3 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 10 Feb 2001 01:22:32 +0000 Subject: r441: * Added dh_installman, a new program that replaces dh_installmanpages. It is not DWIM. You tell it what to install and it figures out where based on .TH section field and filename extention. I reccommend everyone begin using it, since this is much better then dh_installmanpages's evilness. I've been meaning to do this for a very long time.. Closes: #38673, #53964, #64297, #16933, #17061, #54059, #54373, #61816 * dh_installmanpages remains in the package for backwards compatability, but is mildly deprecated. * dh_testversion is deprecated; use build dependancies instead. * dh_suidregister: re-enabled. Aj thinks that requiring people to stop using it is unacceptable. Who am I to disagree with a rc bug report? Closes: #84910 It is still deprecated, and it will still whine at you if you use it. I appreciate the job everyone has been doing at switching to statoverrides.. * Since dh_debstd requires dh_installmanpages (where do you think the latter's evil interface came from?), I have removed it. It was a nice thought-toy, but nobody really used it, right? * Since the from-debstd document walks the maintainer through running dh_debstd to get a list of debhelper commands, and since that document has really outlives its usefullness, I removed it too. Use dh-make instead. * dh_installman installs only into /usr/share/man, not the X11R6 directory. Policy says "files must not be installed into `/usr/X11R6/bin/', `/usr/X11R6/lib/', or `/usr/X11R6/man/' unless this is necessary for the package to operate properly", and I really doubt a man page being in /usr/share/man is going to break many programs. Closes: #81853 (I hope the bug submitter doesn't care that dh_installmanpages still puts stuff in the X11R6/man directory.) * dh_undocumented now the same too now. * dh_installinit: installs debian/package.default files as /etc/default/ files. * Updated to current perl coding standards (use strict, lower-case variable names, pod man pages). * Since with the fixing of the man page installer issue, my checklist for debhelper v3 is complete, I pronounce debhelper v3 done! Revved the version number appropriatly (a large jump; v3 changes less than I had planned). Note that I have no plans for a v4 at this time. :-) * Testing: I have used this new version of debhelper to build a large number of my own packages, and it seems to work. But this release touches every file in this package, so be careful out there.. --- debian/rules | 69 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 36 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 25217881..f889fee5 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,7 @@ export PERL5LIB=. # be sure to use the new templates from this package. export DH_AUTOSCRIPTDIR=autoscripts +# Use most recent compatability level. export DH_COMPAT=3 # Figure out the current debhelper version. @@ -22,18 +23,46 @@ VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Ver # Debug #export DH_VERBOSE=1 -build: test -# Nothing to do. +build: test build-stamp +build-stamp: + # Turn all executables and .pod files into man pages. + find . \( \( -type f -perm +1 -maxdepth 1 \) -or \ + \( -type f -name '*.pod' \) \) \ + -exec pod2man -c Debhelper -r "$(VERSION)" {} {}.1 \; + mv -f debhelper.pod.1 debhelper.1 + # Fix up the debhelper.1 man page, substituting in a list of all + # debhelper commands. Eek! + perl -e ' \ + undef $$/; \ + foreach (@ARGV) { \ + open (IN, $$_) or die "$$_: $$!"; \ + $$file=; \ + close IN; \ + if ($$file=~m/=head1 NAME\n\n(.*?) - (.*?)\n/m) { \ + $$collect.=".IP $$1(1)\n$$2\n"; \ + } \ + } \ + END { \ + open(IN,"debhelper.1") or die "debhelper.1: $$!"; \ + $$file=; \ + open(OUT,">debhelper.1") or die "debhelper.1: $$!";; \ + $$file=~s/#LIST#/$$collect/; \ + print OUT $$file; \ + close OUT; \ + }' dh_* + touch build-stamp clean: ./dh_testdir ./dh_testroot - ./dh_clean + -./dh_clean *.1 *-stamp -test: +test: test-stamp +test-stamp: ./dh_clean DH_VERSION=10 perl -MTest::Harness -e 'runtests grep { ! /CVS/ } @ARGV' t/* ./dh_clean + touch test-stamp # Build architecture-dependent files here. binary-arch: build @@ -61,38 +90,6 @@ binary-indep: build ./dh_installmenu ./dh_installman *.1 ./dh_installinfo - # Fix up all man pages, filling in the modification time for them. - # Note this runs before the command below so debhelper.1 gets the right - # date on it. - perl -mPOSIX -e ' \ - foreach $$f (@ARGV) { \ - @data=stat($$f); \ - $$date=POSIX::strftime("%d %B %Y",localtime($$data[9])); \ - open (IN,$$f); \ - @lines=; \ - close IN; \ - $$lines[0]=~s/1 ""/1 "$$date"/; \ - open (OUT,">$$f"); \ - print OUT @lines; \ - close OUT; \ - }' debian/debhelper/usr/share/man/man1/*.1 - # Fix up the debhelper.1 man page, substituting in a list of all - # debhelper commands. Eek! - perl -ne ' \ - s/\\- /(1)\n/; \ - $$collect.=".TP\n.BR $$_" if $$. eq 3 && /^dh_/; \ - close(ARGV) if eof; \ - END { \ - open(I,"debian/debhelper/usr/share/man/man1/debhelper.1"); \ - @lines=; \ - close I; \ - open(O,">debian/debhelper/usr/share/man/man1/debhelper.1"); \ - foreach (@lines) { \ - s/#LIST#/$$collect/; \ - print O; \ - } \ - close O; \ - }' *.1 ./dh_installchangelogs ./dh_link ./dh_compress -- cgit v1.2.3