I have been trying to create a specfile for OBS that automatically refreshes weekly and changes the version as well,i have gone through multiple iterations but cannot seem to get this right…
its for a software someone wrote I want in the main repos but I want it to be as low maintenance as possible
Name: ttymer
Version: %{autover}
Release: %{autover}
Summary: A terminal-based timer
License: MIT
URL: https://github.com/darwincereska/ttymer
Source0: %{name}-%{version}.tar.gz
BuildRequires: golang >= 1.x
Requires: notify-send
%define autover %(curl -s https://api.github.com/repos/darwincereska/ttymer/releases/latest | jq -r .tag_name)
%description
ttymer is a terminal-based timer application written in Go.
%prep
%setup -q
wget -O %{name}-%{version}.tar.gz https://github.com/darwincereska/ttymer/archive/refs/tags/%{version}.tar.gz
tar -xzf %{name}-%{version}.tar.gz
%build
export GOPATH=%{_builddir}/%{name}-%{version}
go build -o ttymer
%install
install -Dm755 ttymer %{buildroot}%{_bindir}/ttymer
%files
%{_bindir}/ttymer
%changelog
* Mon Jan 20 2025 Your Name <you@example.com> - %{version}-1
- Initial package