Name: sptlrx Version: 1.3.1 Release: 1%{?dist} Summary: Synchronized lyrics in your terminal License: MIT URL: https://github.com/raitonoberu/sptlrx Source0: %{name}-%{version}.tar.gz ExclusiveArch: x86_64 # 工具链 BuildRequires: golang >= 1.26 BuildRequires: go-srpm-macros BuildRequires: gcc BuildRequires: glibc-devel BuildRequires: make BuildRequires: gzip %bcond_without check %description Synchronized lyrics in your terminal. %prep %setup -q -n %{name}-%{version} %build export CGO_ENABLED=1 export CGO_CFLAGS="%{optflags}" export CGO_CPPFLAGS="%{optflags}" export CGO_CXXFLAGS="%{optflags}" export CGO_LDFLAGS="%{__global_ldflags}" # 关键:使用 vendor,避免构建期联网 export GOFLAGS='-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=vendor -modcacherw' go build -v -o %{name} . %check %if %{with check} export GOFLAGS="$GOFLAGS -mod=vendor" go test ./... %endif %install install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 man/%{name}.5 %{buildroot}%{_mandir}/man5/%{name}.5 %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man5/%{name}.5* %changelog * Tue Apr 07 2026 yuliu - 1.3.1-1 - Initial RPM release