Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=4b685e8a3817abc254e76c4d23d883d34f41f008
commit 4b685e8a3817abc254e76c4d23d883d34f41f008 Author: Michel Hermier <[email protected]> Date: Tue Nov 20 12:23:41 2012 +0100 scripts/makepkg * Move info and man compression to a hook. diff --git a/scripts/makepkg b/scripts/makepkg index c4e29c8..7fe4d8a 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1789,15 +1789,36 @@ _pkg_move_man_hook() } _P_subpkgsfixes+=(_pkg_move_man_hook) +_pkg_compress_manuals_hook() +{ + local ext fn i ln + + msg "$1: Compressing info and manual pages..." + find {usr{,/local,/share},opt/*}/{info,man} -type f 2>/dev/null | while read i ; do + ext="${i##*.}" + fn="${i##*/}" + if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then + # update symlinks to this manpage + find {usr{,/local,/share},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do + rm -f "$ln" + ln -sf "${fn}.gz" "${ln}.gz" + done + # compress the original + gzip -9 "$i" + fi + done +} +_P_subpkgsfixes+=(_pkg_compress_manuals_hook) + _subpkgs_removeemptydirfix() { # FIXME: Make it more general (detect all dirs and try to remove them) # and add an option (NOREMOVEEMPTYDIR) to skip this hook - msg "Removing empty dirs..." + msg "$1: Removing empty dirs..." rmdir -p --ignore-fail-on-non-empty \ usr/doc/ \ - usr/info/ - usr/man/ + usr/info/ \ + usr/man/ \ usr/share/doc/$pkgname-$pkgver/ \ usr/share/man/ \ 2>/dev/null @@ -1808,11 +1829,11 @@ _subpkgs_removeemptydirfix() _pkg_strip_hook() { - msg "Stripping debugging symbols from libraries from $subpkg$1..." + msg "$1: Stripping debugging symbols from libraries..." find {,usr,usr/local,opt/*}/lib -type f -not -name "*.dll" -not -name "*.exe" \ -exec /usr/bin/strip --strip-debug '{}' \; 2>&1 \ | grep -v "No such file" | grep -v "format not recognized" - msg "Stripping symbols from binaries from $subpkg$1..." + msg "$1: Stripping symbols from binaries..." find {,usr,usr/local,opt/*}/{bin,sbin} -type f -not -name "*.dll" -not -name "*.exe" \ -exec /usr/bin/strip '{}' \; 2>&1 \ | grep -v "No such file" | grep -v "format not recognized" @@ -1849,22 +1870,6 @@ done do_subpkgsfixes -# compress info and manual pages -msg "Compressing info and manual pages..." -find $startdir/{pkg,pkg.*}/{usr{,/local,/share},opt/*}/{info,man} -type f 2>/dev/null | while read i ; do - ext="${i##*.}" - fn="${i##*/}" - if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then - # update symlinks to this manpage - find $startdir/{pkg,pkg.*}/{usr{,/local,/share},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do - rm -f "$ln" - ln -sf "${fn}.gz" "${ln}.gz" - done - # compress the original - gzip -9 "$i" - fi -done - # check symbolic links msg "Checking symbolic links..." for d in $startdir/{pkg,pkg.*} ; do _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
