1. diff -u -urNZ pkgutils-5.36.orig/pkgmk.in pkgutils-5.36/pkgmk.in
  2. --- pkgutils-5.36.orig/pkgmk.in 2016-12-16 17:39:17.618299670 +0300
  3. +++ pkgutils-5.36/pkgmk.in 2016-12-16 18:14:23.036449733 +0300
  4. @@ -306,6 +306,16 @@
  5. cd $PKG
  6. + find . -type f -path "*/man/man*/*" -links +1 | while read FILE; do
  7. + if [ ! -e "$FILE.gz" ]; then
  8. + gzip < "$FILE" > "$FILE.gz"
  9. + find . -type f -path "*/man/man*/*" -samefile "$FILE" \
  10. + | xargs -n1 -Ixxxx sh -c \
  11. + "test xxxx != \"$FILE\" && ln \"$FILE.gz\" xxxx.gz && rm xxxx"
  12. + rm "$FILE"
  13. + fi
  14. + done
  15. +
  16. find . -type f -path "*/man/man*/*" | while read FILE; do
  17. if [ "$FILE" = "${FILE%%.gz}" ]; then
  18. gzip -9 "$FILE"

compress-hardlinked-mans.patch