mirror of
https://abf.rosa.ru/djam/cilium-cli.git
synced 2025-02-23 15:02:50 +00:00
51 lines
983 B
RPMSpec
51 lines
983 B
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
%define secscan 1
|
|
|
|
Name: cilium-cli
|
|
Version: 0.16.16
|
|
Release: 1
|
|
Summary: CLI to install, manage & troubleshoot Kubernetes clusters running Cilium
|
|
URL: https://cilium.io
|
|
Source0: https://github.com/cilium/cilium-cli/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
License: ASL 2.0
|
|
Group: Development/Other
|
|
BuildRequires: go
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
|
|
%if %{secscan}
|
|
BuildRequires: clamav
|
|
BuildRequires: trivy
|
|
%endif
|
|
|
|
%description
|
|
%{summary}
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%if %{secscan}
|
|
clamscan -ir .
|
|
trivy fs --scanners vuln --format cosign-vuln .
|
|
%endif
|
|
|
|
%build
|
|
CGO_ENABLED=0 go build -ldflags '-w -s -X github.com/cilium/cilium-cli/defaults.CLIVersion=%{version}' -o bin/%{name} ./cmd/cilium
|
|
|
|
upx bin/%{name}
|
|
|
|
%install
|
|
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
%files
|
|
%doc README.md LICENSE
|
|
%{_bindir}/%{name}
|
|
|
|
%check
|
|
export GOPROXY=direct
|
|
go test ./...
|
|
|
|
%if %{secscan}
|
|
clamscan -ir %{buildroot}
|
|
%endif
|