From 8828415f7d08350f236cc60d3c801ccd0ba199d6 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:40:08 +0000 Subject: [PATCH] r42: Initial Import --- debian/changelog | 7 +++++++ dh_lib | 29 ++++++++++++++++------------- dh_undocumented | 3 ++- examples/rules | 2 +- examples/rules.indep | 2 +- examples/rules.multi | 2 +- 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index bfc0579..80d0aaa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.36) unstable; urgency=low + + * dh_undocumented: exit with an error message if the man page specified + does not have a section. + + -- Joey Hess Sat, 27 Dec 1997 14:14:04 -0500 + debhelper (0.35) unstable; urgency=low * dh_lib: use dpkg-parsechangelog instead of parsing it by hand. This diff --git a/dh_lib b/dh_lib index 7a56c15..8347aae 100644 --- a/dh_lib +++ b/dh_lib @@ -51,6 +51,22 @@ pkgext() { fi } +# Returns 1 if the package is a native debian package, null otherwise. +isnative() { + # Get the package version. + # Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it + # output a bogus error message to stderr. + # If it actually has a real error, then the expr will fail, and this whole + # script will come crashing to a halt, which is good enough to inform + # the user something's wrong. :-) + VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : \ + '.*Version: \(.*\).*Distribution:'` + # Is this a native Debian package? + if expr "$VERSION" : '.*-' >/dev/null; then + return 1 + fi +} + # Automatically add a shell script snippet to a debian script. # Only works if the script has #DEBHELPER# in it. # @@ -141,22 +157,9 @@ for i; do esac done -# Get the package version. -# Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it -# output a bogus error message to stderr. -# If it actually has a real error, then the expr will fail, and this whole -# script will come crashing to a halt, which is good enough to inform -# the user something's wrong. :-) -VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : '.*Version: \(.*\).*Distribution:'` - # Get the name of the main binary package. MAINPACKAGE=`grep ^Package: debian/control | cut -d " " -f 2 | head -1` -# Is this a native Debian package? -if ! expr "$VERSION" : '.*-' >/dev/null; then - NATIVE=1 -fi - if [ "$DH_DOINDEP" -o "$DH_DOARCH" ]; then # Figure out all the binary packages to be produced, by looking at the # control file. Break it into 2 lists, INDEP_PACKAGES and ARCH_PACKAGES. diff --git a/dh_undocumented b/dh_undocumented index ee161c5..d0a8feb 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -32,7 +32,8 @@ for PACKAGE in $DH_DOPACKAGES; do # Determine what directory the file belongs in, # /usr/man, or /usr/X11R6/man. - section=`expr "$file" : '.*\.\([123456789]\)'` + section=`expr "$file" : '.*\.\([123456789]\)'` \ + || error "\"$file\" does not have an extention." if [ `expr "$file" : '.*\.[123456789]\(x\)'` ] ; then dir=usr/X11R6/man/man$section reldir=../../../man diff --git a/examples/rules b/examples/rules index 105d91c..29c79de 100755 --- a/examples/rules +++ b/examples/rules @@ -7,7 +7,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp diff --git a/examples/rules.indep b/examples/rules.indep index 5bd756d..fb46c62 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -8,7 +8,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp diff --git a/examples/rules.multi b/examples/rules.multi index eceee35..205ed4c 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -10,7 +10,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp -- 2.39.5