mirror of
https://abf.rosa.ru/djam/docker-sbom.git
synced 2025-02-23 08:02:48 +00:00
46 lines
1,023 B
RPMSpec
46 lines
1,023 B
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
%define plugin sbom
|
|
|
|
%define _libexec /usr/libexec
|
|
%define _dockerpluginsdir %{_libexec}/docker/cli-plugins
|
|
|
|
Name: docker-%{plugin}
|
|
Version: 0.6.1
|
|
Release: 1
|
|
Summary: Plugin for Docker CLI to support SBOM creation using Syft
|
|
URL: https://github.com/docker/sbom-cli-plugin
|
|
Source0: %{url}/archive/v%{version}/%{plugin}-%{version}.tar.gz
|
|
License: ASL 2.0
|
|
Group: Development/Other
|
|
BuildRequires: go
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
|
|
%description
|
|
Plugin for Docker CLI to support viewing and creating SBOMs
|
|
for Docker images using Syft.
|
|
|
|
%prep
|
|
%setup -qn sbom-cli-plugin-%{version}
|
|
|
|
%build
|
|
export GOPROXY=https://proxy.golang.org/cached-only
|
|
go build --ldflags="-s -w" -o bin/%{name} .
|
|
|
|
upx bin/%{name}
|
|
|
|
%install
|
|
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
install -d %{buildroot}%{_dockerpluginsdir}
|
|
|
|
ln -s ../../../bin/%{name} %{buildroot}%{_dockerpluginsdir}/%{name}
|
|
|
|
%files
|
|
%doc README.md LICENSE
|
|
%{_bindir}/%{name}
|
|
%{_dockerpluginsdir}/%{name}
|
|
|
|
|
|
|