From: joey Date: Tue, 17 Aug 1999 05:03:35 +0000 (+0000) Subject: r136: Initial Import X-Git-Tag: debian_version_0_1~103 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1e5ea4d0567b63073061c867062043c4327e62a1;p=debhelper.git r136: Initial Import --- diff --git a/debian/changelog b/debian/changelog index 26d6963..5f3eb36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (1.2.2) unstable; urgency=low + + * dh_du, dh_shlibdeps, dh_undocumented: rewrite in perl. + * dh_undocumented: shortened the symlink used for section 7 undocumented + man pages, since it can link to undocuemented.7.gz in the same directory. + + -- Joey Hess Tue, 10 Nov 1998 13:40:22 -0800 + debhelper (1.2.1) unstable; urgency=low * dh_strip, dh_installinit: rewrite in perl. diff --git a/dh_du b/dh_du index 9e641a2..78518f8 100755 --- a/dh_du +++ b/dh_du @@ -1,8 +1,8 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Generate a DEBIAN/du file, that lists the disk usage of the directories in # the package. # # No longer - it was decided these files are a bad idea. -echo "dh_du: this program does nothing and is deprecated. Remove it from debian/rules." >&2 +print STDERR "dh_du: this program does nothing and is deprecated. Remove it from debian/rules.\n"; diff --git a/dh_getopt.pl b/dh_getopt.pl index b1dcf7b..4d1d390 100755 --- a/dh_getopt.pl +++ b/dh_getopt.pl @@ -27,10 +27,6 @@ my %options=Dh_Getopt::parseopts(); $options{DOPACKAGES}=join " ",@{$options{DOPACKAGES}}; if ($#{$options{EXCLUDE}} > -1) { $options{EXCLUDE_GREP}=join '|', @{$options{EXCLUDE}}; - foreach (@{$options{EXCLUDE}}) { - $options{EXCLUDE_FIND}.="-regex .*".quotemeta($_).".* -or "; - } - $options{EXCLUDE_FIND}=~s/ -or $//; } $options{EXCLUDE}=join " ",@{$options{EXCLUDE}}; diff --git a/dh_makeshlibs b/dh_makeshlibs index eb88f44..68dc83e 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -1,47 +1,49 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Automatically generate shlibs files. -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); -for PACKAGE in $DH_DOPACKAGES; do - TMP=`tmpdir $PACKAGE` +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); - if [ -e "$TMP/DEBIAN/shlibs" ]; then - error "$TMP/DEBIAN/shlibs already exists." - fi + if (-e "$TMP/DEBIAN/shlibs") { + error("$TMP/DEBIAN/shlibs already exists."); + } - for file in `find $TMP -type f -name "*.so.*" | tr "\n" " "` ; do - LIBRARY=`expr $file : ".*/\(.*\)\.so\..*"` || true - LIB_VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true - if [ -z "$DH_M_PARAMS" ]; then - MAJOR=`expr $LIB_VERSION : "\([0-9]*\)\."` || true - else - MAJOR="$DH_M_PARAMS" - fi -# LIBSTUB=`expr $file : "\(.*\/.*\.so\)\..*"` || true - if [ ! -d "$TMP/DEBIAN" ] ; then - doit "install -d $TMP/DEBIAN" - fi - DEPS=$PACKAGE - if [ "$DH_V_FLAG_SET" ]; then - if [ "$DH_V_FLAG" ]; then - DEPS="$DH_V_FLAG" - else - # Call isnative becuase it sets $VERSION + open (FIND, "find $TMP -type f -name '*.so.*' |"); + while () { + chomp; + ($library, $major)=m#.*/(.*)\.so\.(\d*)\.#; + if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') { + $major=$dh{M_PARAMS}; + } + if (! -d "$TMP/DEBIAN") { + doit("install","-d","$TMP/DEBIAN"); + } + $deps=$PACKAGE; + if ($dh{V_FLAG_SET}) { + if ($dh{V_FLAG} ne '') { + $deps=$dh{V_FLAG}; + } + else { + # Call isnative becuase it sets $dh{VERSION} # as a side effect. - isnative || true - DEPS="$PACKAGE (>= $VERSION)" - fi - fi - if [ "$LIBRARY" -a "$MAJOR" -a "$DEPS" ]; then - complex_doit "echo '$LIBRARY $MAJOR $DEPS' >>$TMP/DEBIAN/shlibs" - fi - done + isnative($PACKAGE); + $deps="$PACKAGE (>= $dh{VERSION})"; + } + } + if (defined($library) && defined($major) && defined($deps) && + $library ne '' && $major ne '' && $deps ne '') { + complex_doit("echo '$library $major $deps' >>$TMP/DEBIAN/shlibs"); + } + } + close FIND; - if [ -e "$TMP/DEBIAN/shlibs" ]; then - doit "chmod 644 $TMP/DEBIAN/shlibs" - doit "chown root.root $TMP/DEBIAN/shlibs" - fi -done + if (-e "$TMP/DEBIAN/shlibs") { + doit("chmod",644,"$TMP/DEBIAN/shlibs"); + doit("chown","root.root","$TMP/DEBIAN/shlibs"); + } +} diff --git a/dh_undocumented b/dh_undocumented index edd873f..c4264d6 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Passed a list of undocumented man pages, generates symlinks to # undocumented.7.gz for those man pages. @@ -6,48 +6,49 @@ # Also, it looks for debian/undocumented files for more lists of # undocumented man pages. -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib - -for PACKAGE in $DH_DOPACKAGES; do - TMP=`tmpdir $PACKAGE` - undocumented=`pkgfile $PACKAGE undocumented` - - undoc="" - - if [ "$undocumented" ]; then - undoc=`tr "\n" " " < $undocumented` - fi - - if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \ - -a "$*" ]; then - undoc="$* $undoc" - fi - - if [ "$undoc" ]; then - for file in $undoc; do - # Remove .gz extention from the filename, if present. - if [ `expr "$file" : '\(.*\).gz'` ]; then - file=`expr "$file" : '\(.*\).gz'` - fi - - # Determine what directory the file belongs in, - # /usr/man, or /usr/X11R6/man. - 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 - else - dir=usr/man/man$section - reldir=.. - fi - - if [ ! -d $TMP/$dir ]; then - doit "install -d $TMP/$dir" - fi - - doit "ln -s $reldir/man7/undocumented.7.gz $TMP/$dir/$file.gz" - done - fi -done +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $undocumented=pkgfile($PACKAGE,"undocumented"); + + @undoc=(); + if ($undocumented) { + @undoc=filearray($undocumented); + } + + if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) { + push @undoc, @ARGV; + } + + foreach $file (@undoc) { + $file=~s/.gz$//; # .gz extention is optional in input. + + # Determine what directory the file belongs in, + # /usr/man, or /usr/X11R6/man, and how the link to + # the undocuemtned.7 man page will look. + ($section)=$file=~m/^.*\.(\d)/; + if (!$section) { + error("\"$file\" does not have an extention."); + } + if ($file=~/.*\.\dx/) { + $dir="usr/X11R6/man/man$section"; + $reldir="../../../man/man7/"; + } + elsif ($section != 7) { + $dir="usr/man/man$section"; + $reldir="../man7/"; + } + else { + $dir="usr/man/man$section"; + $reldir=""; + } + + if (! -d "$TMP/$dir") { + doit("install","-d","$TMP/$dir"); + } + doit("ln","-sf","${reldir}undocumented.7.gz","$TMP/$dir/$file.gz"); + } +}