]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_strip
r417: * dh_installinit -r: stop init script in prerm on package removal,
[debhelper.git] / dh_strip
index b39d46554f01fa3b6eecdd3da41c31d553aa58c8..7c851e299d26b46425ecab6f9afc26e0ed39d795 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -6,6 +6,11 @@ use File::Find;
 use Debian::Debhelper::Dh_Lib;
 init();
 
+# This variable can be used to turn off stripping (see Policy).
+if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~ /nostrip/) {
+       exit;
+}
+
 # Check if a file is an elf binary, shared library, or static library,
 # for use by File::Find. It'll fill the following 3 arrays with anything
 # it finds:
@@ -57,11 +62,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        foreach (@shared_libs) {
                # Note that all calls to strip on shared libs
                # *must* inclde the --strip-unneeded.
-               doit("strip","--remove-section=.comment","--remove-section=.note","--strip-unneeded",$_);
+               doit("strip","--remove-section=.comment",
+                       "--remove-section=.note","--strip-unneeded",$_);
        }
        
        foreach (@executables) {
-               doit("strip","--remove-section=.comment","--remove-section=.note",$_);
+               doit("strip","--remove-section=.comment",
+                       "--remove-section=.note",$_);
        }
 
        foreach (@static_libs) {