53f136b18d
rpmbuild's %build shell cannot reliably access the Go toolchain or module cache, risking a 'dev' version string. Build the binary on the runner (where setup-go is active) with the correct -X main.version ldflags, then package it via rpmbuild as a binary-install RPM. Spec changes: Source0/1 are now the binary and LICENSE; %install copies them directly; removed %prep/%build; -bb instead of -ba (no source RPM). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
854 B
RPMSpec
32 lines
854 B
RPMSpec
Name: pgtidy
|
|
Version: 0.0.1
|
|
Release: 1%{?dist}
|
|
Summary: PostgreSQL SQL formatter and linter
|
|
|
|
License: MIT
|
|
URL: https://git.warky.dev/wdevs/pgtidy
|
|
Source0: pgtidy
|
|
Source1: LICENSE
|
|
ExclusiveArch: x86_64
|
|
|
|
%global debug_package %{nil}
|
|
%define _debugsource_packages 0
|
|
%define _debuginfo_subpackages 0
|
|
|
|
%description
|
|
PgTidy formats and lints PostgreSQL SQL, enforcing a consistent style
|
|
for migrations, schemas, functions, procedures, and triggers.
|
|
|
|
%install
|
|
install -Dm755 %{SOURCE0} %{buildroot}%{_bindir}/%{name}
|
|
mkdir -p %{buildroot}%{_datadir}/licenses/%{name}
|
|
install -m644 %{SOURCE1} %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
|
|
|
%files
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/licenses/%{name}/LICENSE
|
|
|
|
%changelog
|
|
* Sun Jun 29 2026 Hein (Warky Devs) <hein@warky.dev> - 0.0.1-1
|
|
- Initial package
|