# Generated by rust2rpm 28 %bcond check 0 %global crate wild-linker Name: wild Version: 0.10.0 Release: %autorelease Summary: Very fast linker for Linux License: MIT OR Apache-2.0 URL: https://crates.io/crates/wild-linker Source: %{crates_source} BuildRequires: cargo-rpm-macros >= 24 Requires(post): alternatives Requires(postun): alternatives %description A very fast linker for Linux. %prep %autosetup -n %{crate}-%{version} %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install ln -s %{_bindir}/wild %{buildroot}%{_bindir}/ld.wild %files %license LICENSE.dependencies %doc README.md %{_bindir}/wild %{_bindir}/ld.wild %post update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.wild 1 %postun if [ "$1" = 0 ]; then update-alternatives --remove ld %{_bindir}/ld.wild fi %if %{with check} %check %cargo_test %endif %changelog %autochangelog