%bcond_without check # https://github.com/lawl/NoiseTorch %global goipath github.com/lawl/NoiseTorch Version: 0.10.0 %global tag 0.10.0 %gometa %global common_description Real-time microphone noise suppression on Linux. %global golicenses LICENSE %global godocs README.md Name: noisetorch Release: 1%{?dist} Summary: Real-time microphone noise suppression on Linux # Upstream license specification: BSD-3-Clause and GPL-3.0-only License: GPLv3 # FIXME: Upstream uses unknown SPDX tag GPL-3.0-only! URL: %{gourl} Source0: %{gosource} Source1: version.go Patch0: 0001-version.patch BuildRequires: desktop-file-utils %description %{common_description} %gopkg %prep %goprep -k %patch0 -p1 sed "s/VERSIONTOKEN/%{Version}/" %{SOURCE1} > version.go %build %make_build rnnoise go generate %gobuild -o %{gobuilddir}/bin/noisetorch %{goipath} %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ ls -lah %{gobuilddir} desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ --set-icon=noisetorch \ %{gobuilddir}/../assets/noisetorch.desktop install -m 0755 -vd %{buildroot}%{_datadir}/icons/hicolor/256x256/apps install -m 0664 -vp %{gobuilddir}/../assets/icon/noisetorch.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/noisetorch.png %if %{with check} %check %gocheck %endif %files %license LICENSE %doc README.md %{_bindir}/* %{_datadir}/applications/noisetorch.desktop %{_datadir}/icons/hicolor/256x256/apps/noisetorch.png %gopkgfiles %changelog * Wed Feb 10 2021 Arthur Bols - 0.10.0-1 - Initial package