Fix build when %_bindir==%_sbindir

Preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.
%install was putting files in the wrong directory.

Also, move %install above %test, because %install happens first, and %test
after that.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-04-17 23:26:03 +02:00
commit 226ede080b

View file

@ -53,16 +53,16 @@ echo %{version}-%{release} > VERSION
%{cargo_license} > LICENSE.dependencies
%cargo_vendor_manifest
%install
# TODO: Check that MANDIR is unused and remove
%make_install MANDIR=%{_mandir} BINDIR=%{buildroot}%{_sbindir}
%if %{with check}
%check
%cargo_test
#cargo test --test thin_shrink -- --nocapture --test-threads=1
%endif
%install
# TODO: Check that MANDIR is unused and remove
%make_install MANDIR=%{_mandir}
%files
%doc README.md
%license COPYING