-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcvetool.spec
More file actions
38 lines (29 loc) · 884 Bytes
/
cvetool.spec
File metadata and controls
38 lines (29 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%global debug_package %{nil}
Name: cvetool
Version: 0.0.1
Release: 1%{?dist}
Summary: A Claircore-based CVE manager
License: Apache-2.0
URL: https://github.com/ComplianceAsCode/cvetool
Source0: https://github.com/ComplianceAsCode/cvetool/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: golang
BuildRequires: git
Requires: glibc
%description
%{summary}
%prep
%setup -q
%build
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go mod tidy
go build -ldflags="-linkmode=external -X main.Version=%{version}-%{release}" ./cmd/cvetool
%install
install -Dm0755 %{name} %{buildroot}%{_bindir}/%{name}
%files
%{_bindir}/%{name}
%license LICENSE
%doc README.md