https://docs.fedoraproject.org/en-US/packaging-guidelines/ says:
> When installing man pages, note that RPM will re-compress them into
> its preferred format. So the %files section MUST reference manpages
> with a pattern that takes this into account:
>
> %files
> %{_mandir}/man1/foo.1*
However, https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ says:
> the links set up by alternatives MUST be listed as %ghost in the file
> list and proper Requires: MUST be added, like in the examples below.
…
> %ghost %{_mandir}/man8/sendmail.8.gz
Notice that the .gz is hard-coded, because the %ghost macro treats * literally.
Sooner or later, someone will want to swap gzip for, say, zstd, and this will break. Do we need a macro specifying the extension, that we can use in such cases? For example:
%__brp_compress_ext .gz
I could do something along the lines of the following to discover the extension, but it seems potentially fragile:
bash -c 'export RPM_BUILD_ROOT=/tmp PREFIX=/no/such/dir; . "$(rpm -E %{__brp_compress})"; echo $COMPRESS_EXT'