X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_strip;h=7c851e299d26b46425ecab6f9afc26e0ed39d795;hb=418435f110b5f39e6933272e051e15d919ef59b9;hp=b39d46554f01fa3b6eecdd3da41c31d553aa58c8;hpb=67b74298f08a3e2b30e43cbcd7cdaccc2e1b1614;p=debhelper.git diff --git a/dh_strip b/dh_strip index b39d465..7c851e2 100755 --- 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) {