# Generated by rust2rpm 21 %bcond_without check %global crate cipo Name: rust-%{crate} Version: 0.1.7 Release: %autorelease Summary: Crypto in, power out License: MIT URL: https://crates.io/crates/cipo Source: %{crates_source} ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 BuildRequires: systemd-rpm-macros %global _description %{expand: Crypto in, power out.} %description %{_description} %package -n %{crate} Summary: %{summary} %description -n %{crate} %{_description} %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install install -dD -m 0750 %{buildroot}%{_sharedstatedir}/cipo install -p -D -m 0640 docs/example-config.toml %{buildroot}%{_sysconfdir}/cipo.toml install -p -D -m 0644 contrib/cipo.sysusers %{buildroot}%{_sysusersdir}/cipo.conf install -p -D -m 0644 contrib/cipo.service %{buildroot}/%{_unitdir}/cipo.service %if %{with check} %check %cargo_test %endif %pre %sysusers_create_compat contrib/cipo.sysusers %post %systemd_post cipo.service %preun %systemd_preun cipo.service %postun %systemd_postun_with_restart cipo.service %files -n %{crate} %license LICENSE %doc README.md %config(noreplace) %attr(0640, root, cipo) %{_sysconfdir}/cipo.toml %{_bindir}/cipo %{_sysusersdir}/cipo.conf %dir %attr(0750, cipo, cipo) %{_sharedstatedir}/cipo %{_unitdir}/cipo.service %changelog %autochangelog