Skip to content

Commit

Permalink
Merge pull request #48 from stefanotorresi/fix/rpm-spec
Browse files Browse the repository at this point in the history
fix RPM spec file
  • Loading branch information
MalloZup authored Jul 3, 2020
2 parents 9386b9c + ce5aea0 commit a5d05f8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
ExclusiveArch: aarch64 x86_64 ppc64le s390x
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: go >= 1.11
BuildRequires: go >= 1.12
Provides: sap_host_exporter = %{version}-%{release}
Provides: prometheus(sap_host_exporter) = %{version}-%{release}
# Unlike C/C++ packages, Golang packages do not have header files. They are statically built so the main package is also the devel package.
Expand All @@ -44,13 +44,12 @@ Prometheus exporter for Pacemaker HA clusters metrics
%setup -q -T -D -a 1 # unpack go dependencies in vendor.tar.gz, which was prepared by the source services

%define shortname sap_host_exporter
%define build_date %(date --iso-8601=seconds)

%build

export CGO_ENABLED=0
go build -mod=vendor \
-ldflags="-s -w -X main.version=%{version} -X main.buildDate=%{build_date}" \
-ldflags="-s -w -X main.version=%{version}" \
-o %{shortname}

%install
Expand Down

0 comments on commit a5d05f8

Please sign in to comment.