specify BuildRequires and %install manually in pwsp.spec

This commit is contained in:
2025-09-25 17:15:37 +03:00
parent b672d9bd10
commit 37723ddc30
+11 -11
View File
@@ -1,3 +1,4 @@
# Generated by rust2rpm 27
%bcond check 1
# prevent library files from being installed
@@ -13,7 +14,11 @@ License: MIT
URL: https://github.com/arabianq/pipewire-soundpad
Source: https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/%{version}.tar.gz
BuildRequires: cargo-rpm-macros >= 26
BuildRequires: rust
BuildRequires: cargo
BuildRequires: pipewire-devel
BuildRequires: alsa-lib-devel
BuildRequires: clang-devel
%global _description %{expand:
PWSP lets you play audio files through your microphone. Has both CLI and
@@ -23,27 +28,22 @@ GUI clients.}
%prep
%autosetup -n pipewire-soundpad-%{version} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
cargo build --release --locked
%install
%cargo_install
install -Dm755 target/release/pwsp-cli %{buildroot}%{_bindir}/pwsp-cli
install -Dm755 target/release/pwsp-daemon %{buildroot}%{_bindir}/pwsp-daemon
install -Dm755 target/release/pwsp-gui %{buildroot}%{_bindir}/pwsp-gui
%if %{with check}
%check
%cargo_test
cargo test
%endif
%files
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/pwsp-cli
%{_bindir}/pwsp-daemon