Ana Guerrero 2024-12-08 10:36:18 +00:00 committed by Git OBS Bridge
commit 18a4656106
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 4 11:32:05 UTC 2024 - Witek Bedyk <witold.bedyk@suse.com>
- Fix build error on Red Hat Enterprise Linux
-------------------------------------------------------------------
Sat Apr 20 11:43:43 UTC 2024 - opensuse_buildservice@ojkastl.de

View File

@ -16,6 +16,12 @@
#
%if 0%{?rhel}
%global debug_package %{nil}
# Fix ERROR: No build ID note found in
%undefine _missing_build_ids_terminate_build
%endif
%define shortname promu
Name: golang-github-prometheus-promu
@ -31,9 +37,7 @@ Source1: vendor.tar.gz
Patch2: extldflags-no-static.patch
ExcludeArch: s390
%if 0%{?rhel}
# Fix ERROR: No build ID note found in
%undefine _missing_build_ids_terminate_build
BuildRequires: golang >= 1.21
BuildRequires: golang >= 1.20
%else
BuildRequires: golang(API) >= 1.21
%endif
@ -53,6 +57,10 @@ go build
%check
# execute the binary as a basic check
./%{shortname} --help
%if 0%{?rhel}
rm -f %{buildroot}/usr/lib/debug%{_bindir}/%{shortname}*.debug
rm -rf %{buildroot}/usr/lib/debug/.build-id/*
%endif
%install
install -D -m 0755 %{shortname} "%{buildroot}/%{_bindir}/%{shortname}"