Use %_prefix when installing chg

%_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.
This commit is contained in:
Yaakov Selkowitz 2023-10-11 12:09:39 -04:00 committed by Mads Kiilerich
parent 9562d17014
commit b94d33fc2f

View File

@ -197,7 +197,7 @@ done
popd
pushd contrib/chg
make install DESTDIR=%{buildroot} PREFIX=%{_usr} MANDIR=%{_mandir}/man1
make install DESTDIR=%{buildroot} PREFIX=%{_prefix} MANDIR=%{_mandir}/man1
popd