After some subpackages have been merged/dropped, the file listings were
only used to filter out hgk. That was overly complex. It is simpler to
just be explicit.
This also fixes the hgk .pyc not being packaged together with the .py
file.
This change was isolated and documented (and obfuscated?) by Mads Kiilerich.
/usr/share/bash-completion/completions is owned by the ubiquitous
filesystem package (and bash-completion). This package shouldn't own it.
/usr/share/bash-completion/completions/hg is already installed by
setup.py . zsh is also installed by setup.py, but as _hg . List both
files with the right macros and explicitly, even though it temporarily
will list the files twice since they also are in the file list.
This change was isolated and documented (and obfuscated?) by Mads Kiilerich.
%_prefix is usually /usr . But it is a "thing" to build with a custom
%_prefix, and that should put all/most files under that prefix instead
of /usr . Other macros like %_mandir will change accordingly.
There is also %_usr , but that is apparently a pointless macro that
always is /usr . We should avoid using %_usr, and use %_prefix instead.
Flatpak builds set a custom %_prefix, and when chg was installed into
%_usr/bin it failed as described on
https://docs.fedoraproject.org/en-US/flatpak/troubleshooting/#_files_outside_of_app .
Change the spec to install chg in %_prefix/bin .
This change was isolated and documented (and obfuscated?) by Mads
Kiilerich.
Man pages are usually compressed and gets the .gz extension when
rpmbuild invokes /usr/lib/rpm/brp-compress . But even though %_mandir is
%{_datadir}/man and %_datadir is %{_prefix}/share , brp-compress isn't
informed about the actual _prefix and will always only process /usr .
That seems like a bug. For now, we will work around it.
Building with custom _prefix seems to be essentially what flatpak is
doing, but I don't know if that is an actual problem there. Being able
to build with a custom _prefix seems like a fine goal anyway. It is not
a problem to relax the globs.
This is also documented on
https://docs.fedoraproject.org/en-US/flatpak/troubleshooting/#_uncompressed_manual_pages .