2023-11-05 15:07:22 +03:00
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
2024-07-10 10:02:48 +00:00
|
|
|
%define secscan 0
|
2023-11-05 15:07:22 +03:00
|
|
|
|
|
|
|
Name: finch
|
2024-10-25 14:32:31 +00:00
|
|
|
Version: 1.4.1
|
2023-11-05 15:07:22 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: The Finch CLI an open source client for container development
|
|
|
|
URL: https://github.com/runfinch/finch
|
|
|
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
License: ASL 2.0
|
|
|
|
Group: Development/Other
|
|
|
|
BuildRequires: go
|
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: upx
|
2024-07-10 10:02:48 +00:00
|
|
|
#BuildRequires: lima
|
2024-07-02 22:20:41 +00:00
|
|
|
%if %{secscan}
|
|
|
|
BuildRequires: clamav
|
|
|
|
BuildRequires: trivy
|
|
|
|
%endif
|
2023-11-05 15:07:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
Finch is an open source client for container development.
|
|
|
|
Its simple installer provides a minimal native client along
|
|
|
|
with an opinionated distribution of other open source
|
|
|
|
components. Rather than creating even more options to reason
|
|
|
|
about and choose from, Finch aims to help promote other
|
|
|
|
projects by making it easy to install and use them, while
|
|
|
|
offering a simple native client to tie it all together
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2024-07-02 22:20:41 +00:00
|
|
|
%if %{secscan}
|
|
|
|
clamscan -ir .
|
|
|
|
trivy fs --scanners vuln --format cosign-vuln .
|
|
|
|
%endif
|
2023-11-05 15:07:22 +03:00
|
|
|
|
|
|
|
%build
|
2024-09-27 12:26:18 +00:00
|
|
|
export GOPROXY=https://proxy.golang.org/cached-only
|
2023-11-05 15:07:22 +03:00
|
|
|
export VERSION=%{verson}
|
|
|
|
#make %{name}
|
|
|
|
|
|
|
|
go build -ldflags "-s -w -X github.com/runfinch/finch/pkg/version.Version=%{version} -X github.com/runfinch/finch/pkg/version.GitCommit=.m" -o bin/%{name} ./cmd/finch
|
|
|
|
|
|
|
|
upx bin/finch
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
2024-07-02 22:20:41 +00:00
|
|
|
%check
|
|
|
|
export GOPROXY=https://proxy.golang.org/cached-only
|
|
|
|
#go test ./...
|
|
|
|
|
|
|
|
%if %{secscan}
|
|
|
|
clamscan -ir %{buildroot}
|
|
|
|
%endif
|