From 3d85a497a3d346e2e6072e31c3a12147e1521134 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:56:41 +0000 Subject: [PATCH] r106: Initial Import --- debian/changelog | 11 +++++++++++ dh_clean.1 | 2 +- dh_strip | 26 +++++++++++++++++++------- dh_strip.1 | 7 ++++++- doc/TODO | 20 +++++++++++++++++++- examples/rules | 1 + examples/rules.indep | 1 + examples/rules.multi | 2 ++ 8 files changed, 60 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 38ae777..63e0423 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (1.1.1) unstable; urgency=low + + * dh_movefiles: try to move all files specified, and only then bomb out if + some of the file could not be found. Makes it easier for some packages + that don't always have the same files in them. + * dh_compress: any parameters passed to it on the command line specify + additional files to be compressed in the first package acted on. + * dh_compress: recognize standard -A parameter. + + -- Joey Hess Sat, 8 Aug 1998 22:48:01 -0700 + debhelper (1.1.0) unstable; urgency=low * New unstable branch of debhelper. diff --git a/dh_clean.1 b/dh_clean.1 index 333fa17..3c1d279 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -8,7 +8,7 @@ dh_clean \- clean up package build directories dh_clean is a debhelper program that is responsible for cleaning up after a package is built. It removes the package build directories, and removes some other files, such as debian/substvars, debian/files, DEADJOE, emacs backup -files, etc. +files, any detritus left behind by other debhelper commands, etc. .SH OPTIONS .TP .B debhelper options diff --git a/dh_strip b/dh_strip index daea754..385efef 100755 --- a/dh_strip +++ b/dh_strip @@ -5,26 +5,38 @@ PATH=debian:$PATH:/usr/lib/debhelper . dh_lib +# This reads in a list of files, and excludes any that match what's in +# DH_EXCLUDE_GREP. +filelist_excluded () { + if [ "$DH_EXCLUDE_GREP" ]; then + # Use grep -F so we don't have to worry about regexp's. + grep -v -F "`(cd $TMP; echo "$DH_EXCLUDE_GREP" | tr "|" "\n")`" + else + # Just pass all files through. + cat + fi +} + for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - + # Handle executables and shared libraries. - for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do - case "`file $file`" in + for file in `(cd $TMP; find -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null) | filelist_excluded` ; do + case "`file $TMP/$file`" in *ELF*shared*) - doit "strip --strip-unneeded $file" + doit "strip --strip-unneeded $TMP/$file" ;; *ELF*executable*) - doit "strip --remove-section=.comment --remove-section=.note $file" + doit "strip --remove-section=.comment --remove-section=.note $TMP/$file" ;; esac done # Handle static libraries. - for file in `find $TMP -type f -name "lib*.a" 2>/dev/null` ; do + for file in `(cd $TMP; find -type f -name "lib*.a" 2>/dev/null) | filelist_excluded` ; do # Don't strip debug libraries. if ! expr "$file" : ".*_g\.a" >/dev/null ; then - doit "strip --strip-debug $file" + doit "strip --strip-debug $TMP/$file" fi done done diff --git a/dh_strip.1 b/dh_strip.1 index 960dc72..6ddcde1 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -3,7 +3,7 @@ dh_strip \- strip executables, shared libraries, and some static libraries. .SH SYNOPSIS .B dh_strip -.I "[debhelper options]" +.I "[debhelper options] [-Xitem]" .SH "DESCRIPTION" dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for @@ -17,6 +17,11 @@ used in debugging, and will not strip them. See .BR debhelper (1) for a list of options common to all debhelper commands. +.TP +.B \-Xitem, \--exclude=item +Exclude files that contain "item" anywhere in their filename from being +stripped. You may use this option multiple times to build up a list of +things to exclude. .SH ENVIRONMENT See .BR debhelper (1) diff --git a/doc/TODO b/doc/TODO index 0a2a5bd..83f3865 100644 --- a/doc/TODO +++ b/doc/TODO @@ -11,7 +11,6 @@ Bugs: Wishlist items: -* Add emacsen support to debhelper. (#21401) * Make dh_movefiles remove emptied directories after it's moved all the files out of them (#17111). * info support for debhelper (currently implemented, but I hate how I did it, @@ -59,3 +58,22 @@ Depricated: * remove dh_installdebfiles, dh_du. - need to wait a reasonable length of time. I'm currently planning on doing this after slink is released. + +Long term goals: + +Convert selected and then selected debhelper commands (dh_installmanpages?) +to be perl programs, for speed, ease of maintainence, and 8-bit cleanness. +Tricky, because of the -v option -- they'd have to call external commands +like install and cp, and log such calls if verbose was on. Maybe something +like: + +doit { + system @_; + if ($DH_VERBOSE) { + print join " ", @_; + } +} + +However, this will output commands that are incorrect if the filenames in +them contain spaces or other weird characters. Hmm, maybe such things should +just be escaped with \'s in the output? diff --git a/examples/rules b/examples/rules index e3e6c3b..8756505 100755 --- a/examples/rules +++ b/examples/rules @@ -48,6 +48,7 @@ binary-arch: build install dh_installdocs dh_installexamples dh_installmenu +# dh_installemacsen # dh_installinit dh_installcron dh_installmanpages diff --git a/examples/rules.indep b/examples/rules.indep index bb2e00b..eabd484 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -45,6 +45,7 @@ binary-indep: build install dh_installdocs dh_installexamples dh_installmenu +# dh_installemacsen # dh_installinit dh_installcron # dh_installmanpages diff --git a/examples/rules.multi b/examples/rules.multi index 42e4052..5852751 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -48,6 +48,7 @@ binary-indep: build install dh_installdocs -i dh_installexamples -i dh_installmenu -i +# dh_installemacsen -i # dh_installinit -i dh_installcron -i # dh_installmanpages -i @@ -70,6 +71,7 @@ binary-arch: build install dh_installdocs -a dh_installexamples -a dh_installmenu -a +# dh_installemacsen -a # dh_installinit -a dh_installcron -a dh_installmanpages -a -- 2.39.5