X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=dh_compress;h=015a1abb9e8d32c74374e22efe99293832e4d0d8;hb=705be431f33d24a3ecc3b2de9d527f6768a6878f;hp=1312bf46afd27880834688dcb4e81b82a625e1b2;hpb=9d3fce399b4344e7a0453abcc90c1bf74bd6d10d;p=debhelper.git diff --git a/dh_compress b/dh_compress index 1312bf4..015a1ab 100755 --- a/dh_compress +++ b/dh_compress @@ -4,8 +4,7 @@ # compressed files get fixed. use Cwd; -BEGIN { push @INC, "debian", "/usr/share/debhelper" } -use Dh_Lib; +use Debian::Debhelper::Dh_Lib; init(); foreach $PACKAGE (@{$dh{DOPACKAGES}}) { @@ -34,13 +33,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { # Note that all the excludes of odd things like _z are because # gzip refuses to compress such files, assumming they are zip files. # I looked at the gzip source to get the complete list of such - # extentions: ".gz", ".z", ".taz", ".tgz", "-gz", "-z", "_z" + # extensions: ".gz", ".z", ".taz", ".tgz", "-gz", "-z", "_z" push @files, split(/\n/,` find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null || true; find usr/doc usr/share/doc -type f \\( -size +4k -or -name "changelog*" \\) \\ - \\( -name changelog.html -or ! -name "*.htm*" \\) \\ - ! -name "*.gif" ! -iname "*.gz" \\ + \\( -name changelog.html -or ! -iname "*.htm*" \\) \\ + ! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" ! -iname "*.jpeg" ! -iname "*.gz" \\ ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\ ! -iname "*-gz" ! -iname "*-z" ! -iname "*_z" \\ ! -name "copyright" 2>/dev/null || true @@ -86,6 +85,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } if (@f) { + # Make executables not be anymore. + xargs(\@f,"chmod","a-x"); + xargs(\@f,"gzip","-9f"); }