You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.9 KiB
76 lines
1.9 KiB
# Generated by rust2rpm 24
|
|
%bcond_without check
|
|
|
|
%global crate speakersafetyd
|
|
|
|
Name: rust-speakersafetyd
|
|
Version: 0.1.5
|
|
Release: %autorelease
|
|
Summary: Speaker protection daemon for embedded Linux systems
|
|
|
|
License: MIT
|
|
URL: https://crates.io/crates/speakersafetyd
|
|
Source: %{crates_source}
|
|
|
|
BuildRequires: cargo-rpm-macros >= 24
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%global _description %{expand:
|
|
Speaker protection daemon for embedded Linux systems.}
|
|
|
|
%description %{_description}
|
|
|
|
%package -n %{crate}
|
|
Summary: %{summary}
|
|
License: MIT AND (Apache-2.0 OR MIT) AND (MIT OR LGPL-3.0-or-later) AND MPL-2.0
|
|
Requires: systemd-udev
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
%files -n %{crate}
|
|
%license LICENSE
|
|
%license LICENSE.dependencies
|
|
%doc README.md
|
|
%{_bindir}/speakersafetyd
|
|
%{_datadir}/speakersafetyd/
|
|
%{_unitdir}/speakersafetyd.service
|
|
%{_sharedstatedir}/speakersafetyd/
|
|
%{_udevrulesdir}/95-speakersafetyd.rules
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
%cargo_prep
|
|
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
|
|
%build
|
|
%cargo_build
|
|
%{cargo_license_summary}
|
|
%{cargo_license} > LICENSE.dependencies
|
|
|
|
%install
|
|
%cargo_install
|
|
install -p -m 0644 -D speakersafetyd.service %{buildroot}%{_unitdir}/speakersafetyd.service
|
|
install -p -m 0644 -D 95-speakersafetyd.rules %{buildroot}%{_udevrulesdir}/95-speakersafetyd.rules
|
|
install -d -m 0755 %{buildroot}%{_datadir}/speakersafetyd/apple
|
|
install -p -m 0644 -t %{buildroot}%{_datadir}/speakersafetyd/apple conf/apple/*
|
|
install -d -m 0755 %{buildroot}%{_sharedstatedir}/speakersafetyd/blackbox
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%post -n %{crate}
|
|
%systemd_post speakersafetyd.service
|
|
|
|
%preun -n %{crate}
|
|
%systemd_preun speakersafetyd.service
|
|
|
|
%postun -n %{crate}
|
|
%systemd_postun_with_restart speakersafetyd.service
|
|
|
|
%changelog
|
|
%autochangelog
|