summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorjoey <joey>2001-02-13 00:33:21 +0000
committerjoey <joey>2001-02-13 00:33:21 +0000
commit6a4b0f4e4b28688208ecd2d73609436232d878c3 (patch)
treedd7fe7b93bcd60ee04bbdcbb6b482652eebabaaf /debian/rules
parent0227dc72f4eaec2a28b4502314405610db54f86c (diff)
r443: * Build-depends on perl-5.6, since it uses 2 argument pod2man.
* Cleanups of debhelper.1 creation process.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules25
1 files changed, 11 insertions, 14 deletions
diff --git a/debian/rules b/debian/rules
index f889fee5..a746144a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,13 +25,9 @@ VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Ver
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!
+ # Generate the main man page. All the perl cruft is to get a list
+ # of debhelper commands with short descriptions into the man page.
+ pod2man -c Debhelper -r "$(VERSION)" debhelper.pod | \
perl -e ' \
undef $$/; \
foreach (@ARGV) { \
@@ -43,13 +39,14 @@ build-stamp:
} \
} \
END { \
- open(IN,"debhelper.1") or die "debhelper.1: $$!"; \
- $$file=<IN>; \
- open(OUT,">debhelper.1") or die "debhelper.1: $$!";; \
- $$file=~s/#LIST#/$$collect/; \
- print OUT $$file; \
- close OUT; \
- }' dh_*
+ while (<STDIN>) { \
+ s/#LIST#/$$collect/; \
+ print; \
+ }; \
+ }' `find . -type f -perm +1 -maxdepth 1 -name "dh_*"` > debhelper.1
+ # Turn all executables into man pages.
+ find . -type f -perm +1 -maxdepth 1 -name "dh_*" \
+ -exec pod2man -c Debhelper -r "$(VERSION)" {} {}.1 \;
touch build-stamp
clean: