From 7c9cd3a473fa6ab09c4bbe565f39e95c8e358e50 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:01:13 +0000 Subject: [PATCH] r122: Initial Import --- debian/changelog | 9 +++++++++ dh_fixperms | 5 +++-- dh_installmanpages | 12 +++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 651c20a..bb95dc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (1.1.15) unstable; urgency=medium + + * dh_installmanpages: the new perl version had a nasty habit of + installing .so.x library files as man pages. Fixed. + * dh_installmanpages: the code to exclude searching for man pages in + debian/tmp directories was broken. Fixed. + + -- Joey Hess Mon, 31 Aug 1998 00:05:17 -0700 + debhelper (1.1.14) unstable; urgency=low * Debhelper now has a web page at http://kitenet.net/programs/debhelper/ diff --git a/dh_fixperms b/dh_fixperms index 0e84533..b36f68c 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -42,8 +42,9 @@ for PACKAGE in $DH_DOPACKAGES; do complex_doit "find $TMP/usr/man/ $TMP/usr/X11*/man/ -type f \ $FIND_OPTIONS -print0 2>/dev/null | xargs -0r chmod 644" - # ..and so are executable shared libraries (and .la files from libtool) + # ..and so are executable shared and static libraries + # (and .la files from libtool) complex_doit "find $TMP -perm -5 -type f \ - \( -name "*.so*" -or -name "*.la" \) $FIND_OPTIONS -print0 \ + \( -name "*.so*" -or -name "*.la" -or -name "*.a" \) $FIND_OPTIONS -print0 \ 2>/dev/null | xargs -0r chmod a-X" done diff --git a/dh_installmanpages b/dh_installmanpages index 34d3328..24772e5 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -13,6 +13,7 @@ init(); # Check if a file is a man page, for use by File::Find. my @manpages; +my @allpackages; sub find_man { # Does its filename look like a man page? # .ex files are examples installed by deb-make, @@ -21,12 +22,20 @@ sub find_man { if (! (-f $_ && /^.*\.[1-9].*$/ && ! /\.(ex|in)$/)) { return; } + # It's not in a tmp directory is it? if ($File::Find::dir=~m:debian/.*tmp.*:) { return; } + foreach $dir (@allpackages) { + if ($File::Find::dir=~m:debian/$dir:) { + return; + } + } + # And file does think it's a real man page? - if (! `file $_`=~/roff/) { + my $type=`file $_`; + if ($type !~ m/:.*roff/) { return; } @@ -68,6 +77,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { # Find all filenames that look like man pages. @manpages=(); + @allpackages=GetPackages(''); find(\&find_man,'.'); # populates @manpages foreach $page (@manpages) { -- 2.39.5