]> git.donarmstrong.com Git - debhelper.git/commitdiff
r42: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:40:08 +0000 (04:40 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:40:08 +0000 (04:40 +0000)
debian/changelog
dh_lib
dh_undocumented
examples/rules
examples/rules.indep
examples/rules.multi

index bfc057960486f7ed8237fa3757151426fd3d11a3..80d0aaa33aa82776f0fe1163241a59032cbc5e3e 100644 (file)
@@ -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 <joeyh@master.debian.org>  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 7a56c15642692d02321309fd66ab405d943a662c..8347aae88d31e7df4f519d26c480923e3f19e8ab 100644 (file)
--- 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.
index ee161c52c28e67652386c4e0f673e22c5bcb6973..d0a8febd28a7c30efeabdf470ec0f652f0a66d35 100755 (executable)
@@ -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
index 105d91c03ddb74af81f308111ecc689229131a99..29c79dee5d021a919da86f507481b69a65d4abed 100755 (executable)
@@ -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
 
index 5bd756dece32f4ff564deb35cef0994cfd04ef25..fb46c6234772d9d7f324f4533f4c7b5017cfb3e5 100755 (executable)
@@ -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
 
index eceee3508057597e64ecb8be7a961385872aa76a..205ed4c8e584add167c8380f8af7ec6a9a9dda4d 100755 (executable)
@@ -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