add: golang-github-dhth-prs (#3254)

* add: prs

* use mock to build

* Revert "use mock to build"

This reverts commit c69f400111.

* build without fedora macros
This commit is contained in:
sadlerm4
2025-02-10 04:51:27 +11:00
committed by GitHub
parent 865ce7e301
commit 73d7a032ef
3 changed files with 62 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "golang-github-dhth-prs.spec"
}
}
@@ -0,0 +1,56 @@
# Generated by go2rpm 1.15.0
# https://github.com/dhth/prs
%global goipath github.com/dhth/prs
Version: 1.0.0
%gometa -f
%global common_description %{expand:
Stay updated on PRs from your terminal.}
%global golicenses LICENSE
%global godocs README.md ui/assets/help.md
Name: golang-github-dhth-prs
Release: %autorelease
Summary: Stay updated on PRs from your terminal
License: MIT
URL: %{gourl}
Source: %{gosource}
BuildRequires: anda-srpm-macros
BuildRequires: git-core
Packager: sadlerm <lerm@chromebooks.lol>
%description %{common_description}
%gopkg
%prep
%git_clone https://%{goipath} v%{version}
%go_prep_online
%build
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \
-ldflags "-B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \
-compressdwarf=false -linkmode=external \
-extldflags '-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'" \
-o %{_builddir}/bin/prs .
%install
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{_builddir}/bin/* %{buildroot}%{_bindir}/
%files
%license LICENSE
%doc README.md ui/assets/help.md
%{_bindir}/prs
%changelog
* Sun Feb 9 2025 sadlerm <lerm@chromebooks.lol>
- Initial package
+1
View File
@@ -0,0 +1 @@
rpm.version(gh("dhth/prs"));