## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global project beetbrainz %global goipath codeberg.org/gbcox/%{project} %global forgeurl https://codeberg.org/gbcox/%{project}/ %global commit 9bf7c065a2f3694b4e4e61c2cfa6e8dfb048fc2c %define debug_package %{nil} %global golicenses LICENSE.md %global godocs README.md %global common_description %{expand: %{project} is a lightweight Go-based webhook listener designed to bridge the gap between your media server playback and your MusicBrainz scrobbling via ListenBrainz.} %gometa Name: %{goname} Version: 1.0.11 Release: %autorelease Summary: Provides webhook integration for ListenBrainz scrobbling with %{project} License: GPL-3.0-or-later URL: %{gourl} Source0: %{gosource} Source1: %{project}.service Source2: %{project} BuildRequires: golang > 1.24 BuildRequires: systemd # If building for Fedora ≤ 42 or beets is available # Required because rawhide isn't ready # Hard requirement for stable releases, skip in Rawhide (F43) %if 0%{?fedora} < 43 Requires: beets %endif %description %common_description %prep %goprep %build export GOFLAGS="-mod=readonly" export LDFLAGS="-s -w \ -X main.appVersion=%{version} \ -X main.commit=%{commit} \ -X main.shortCommit=%{shortcommit} \ -linkmode external -extldflags \"-pie -fPIE -Wl,-z,relro -Wl,--as-needed \ -Wl,-z,pack-relative-relocs -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ -Wl,--build-id=sha1 \ -specs=/usr/lib/rpm/redhat/redhat-package-notes\"" %gobuild -o %{project} . %install install -Dm755 %{project} %{buildroot}%{_bindir}/%{project} install -Dm644 %{SOURCE1} %{buildroot}%{_unitdir}/%{project}.service install -Dm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{project} %check # No upstream tests provided. # If tests are added upstream in the future, they should be included here. %post %systemd_post %{project}.service %preun %systemd_preun %{project}.service %files %license %{golicenses} %doc %{godocs} %config(noreplace) %{_sysconfdir}/sysconfig/%{project} %{_bindir}/%{project} %{_unitdir}/%{project}.service %changelog ## START: Generated by rpmautospec * Sun Jun 22 2025 John Doe - 1.0.11-1 - Uncommitted changes ## END: Generated by rpmautospec