%bcond_without check # https://github.com/lawl/NoiseTorch %global goipath github.com/lawl/NoiseTorch Version: 0.11.5 %global tag 0.11.5 %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 License: GPLv3 URL: %{gourl} Source0: %{gosource} BuildRequires: desktop-file-utils %description %{common_description} %gopkg %prep %goprep -k %build %make_build rnnoise go generate export LDFLAGS="-X main.version=%{version} -X main.distribution=Fedora" %gobuild -o %{gobuilddir}/bin/noisetorch %{goipath} %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ 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 %post setcap cap_sys_resource+eip %{_bindir}/noisetorch %changelog * Mon Apr 18 2022 Arthur Bols - 0.11.5-1 - Upstream release 0.11.5. * Fri Dec 17 2021 Arthur Bols - 0.11.4-1 - Upstream release 0.11.4. * Sun Jun 06 2021 Arthur Bols - 0.11.3-1 - Upstream release 0.11.3. * Wed May 26 2021 Arthur Bols - 0.11.2-1 - Upstream release 0.11.2. - Set CAP_SYS_RESOURCE in post. * Mon Feb 22 2021 Arthur Bols - 0.10.1-1 - Upstream release 0.10.1. * Wed Feb 10 2021 Arthur Bols - 0.10.0-1 - Initial package