Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix RPM spec file #48

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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