diff options
author | joey <joey> | 1999-08-17 04:40:08 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 04:40:08 +0000 |
commit | 8828415f7d08350f236cc60d3c801ccd0ba199d6 (patch) | |
tree | f80fd6290c80f4199469dd3cbef440460294d8be /dh_lib | |
parent | 1352476d748b5137881c467365f0ed5c34297c5d (diff) | |
download | debhelper-8828415f7d08350f236cc60d3c801ccd0ba199d6.tar.gz |
r42: Initial Import
Diffstat (limited to 'dh_lib')
-rw-r--r-- | dh_lib | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -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. |