function compress_man_pages

Main purpose

  1. Decompress all man and info pages found in the package.
  2. Correct permissions.
  3. Re-compress them uniformly.

Notes

All man-pages and info pages are first uncompressed if needed. Then the permissions of the uncompressed files are corrected and they are re-compressed using the MAN_COMPRESS command. By default they are compressed with gzip, but you can use MAN_COMPRESS=bzip2.

Some sources install pre-compressed man-pages and they may not be using the same compression or have proper file permissions when uncompressed. This is why everything is unpacked first and then recompressed.