syft/syft.spec

39 lines
839 B
RPMSpec
Raw Normal View History

2024-09-14 22:47:26 +03:00
%define debug %nil
%define debug_package %nil
Name: syft
2024-11-21 21:03:08 +00:00
Version: 1.17.0
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
2024-10-29 21:34:02 +00:00
BuildRequires: pkgconfig(openssl3.3)
2024-09-14 22:47:26 +03:00
%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}