syft/syft.spec

38 lines
801 B
RPMSpec
Raw Normal View History

2024-09-14 22:47:26 +03:00
%define debug %nil
%define debug_package %nil
Name: syft
2024-10-18 18:30:48 +00:00
Version: 1.14.1
2024-09-14 22:47:26 +03:00
Release: 1
Summary: CLI tool for generating a SBOM
URL: https://github.com/anchore/syft
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
License: ASL 2.0
Group: Security
BuildRequires: go
BuildRequires: git-core
BuildRequires: upx
%description
A CLI tool and Go library for generating a Software Bill of
Materials (SBOM) from container images and filesystems.
Exceptional for vulnerability detection when used with a
scanner like Grype.
%prep
%setup -q
%build
2024-10-08 08:42:46 +00:00
export GOPROXY=https://proxy.golang.org/cached-only
2024-09-14 22:47:26 +03:00
go build -ldflags "-s -w" -o bin/%{name} ./cmd/%{name}
upx bin/%{name}
%install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%files
%doc README.md LICENSE
%{_bindir}/%{name}