# Generated by rust2rpm 26 %bcond_without check # prevent library files from being installed %global cargo_install_lib 0 %global crate sudo-rs Name: sudo-rs Version: 0.2.7 Release: %autorelease Summary: Memory safe implementation of sudo and su SourceLicense: Apache-2.0 OR MIT # Apache-2.0 OR MIT # MIT OR Apache-2.0 License: Apache-2.0 OR MIT # LICENSE.dependencies contains a full license breakdown URL: https://github.com/trifectatechfoundation/sudo-rs Source: %{url}/archive/v%{version}/sudo-rs-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: pam-devel %if %{with check} BuildRequires: /usr/bin/pkill %endif %global _description %{expand: A memory safe implementation of sudo and su.} %description %{_description} %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f pam-login %build %cargo_build -f pam-login %{cargo_license_summary -f pam-login} %{cargo_license -f pam-login} > LICENSE.dependencies %install %cargo_install -f pam-login # rename binaries so they do not conflict with sudo mv %{buildroot}/%{_bindir}/su %{buildroot}/%{_bindir}/su-rs mv %{buildroot}/%{_bindir}/sudo %{buildroot}/%{_bindir}/sudo-rs mv %{buildroot}/%{_bindir}/visudo %{buildroot}/%{_bindir}/visudo-rs %if %{with check} %check %cargo_test -f pam-login %endif %files %license COPYRIGHT %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %doc CHANGELOG.md %doc CODE_OF_CONDUCT.md %doc CONTRIBUTING.md %doc README.md %doc SECURITY.md %attr(4755, root, root) %{_bindir}/su-rs %attr(4111, root, root) %{_bindir}/sudo-rs %attr(0755, root, root) %{_bindir}/visudo-rs %changelog %autochangelog