gh/gh.spec

62 lines
1.2 KiB
RPMSpec
Raw Normal View History

2020-02-16 21:30:11 +03:00
%define debug %nil
%define debug_package %nil
2024-10-26 06:29:54 +00:00
%define secscan 0
2020-02-16 21:30:11 +03:00
Name: gh
2025-02-12 12:09:34 +00:00
Version: 2.67.0
2020-02-16 21:30:11 +03:00
Release: 1
Summary: github cli
2022-12-24 00:09:21 +03:00
URL: https://cli.github.com
2020-02-16 21:30:11 +03:00
Source0: https://github.com/cli/cli/archive/v%{version}/%{name}-%{version}.tar.gz
License: MIT
Group: Development/Other
2022-07-31 11:22:27 +03:00
BuildRequires: go > 1.16
2024-06-24 20:34:31 +00:00
BuildRequires: git-core
2020-03-04 19:44:17 +03:00
BuildRequires: upx
2020-02-16 21:30:11 +03:00
2024-06-24 20:34:31 +00:00
%if %{secscan}
BuildRequires: clamav
BuildRequires: trivy
%endif
2024-11-10 21:41:05 +00:00
BuildRequires: pkgconfig(openssl3.3)
2024-06-24 20:34:31 +00:00
2020-02-16 21:30:11 +03:00
%description
gh is GitHub on the command line, and it's now available
in beta. It brings pull requests, issues, and other GitHub
concepts to the terminal next to where you are already
2working with git and your code
%prep
%setup -qn cli-%{version}
2024-06-24 20:34:31 +00:00
%if %{secscan}
clamscan -ir .
trivy fs --scanners vuln --format cosign-vuln .
%endif
2020-02-16 21:30:11 +03:00
%build
2025-02-12 12:09:34 +00:00
export GOPROXY=https://proxy.golang.org,direct
2024-06-24 20:34:31 +00:00
%make VERSION=%{version}
2020-02-16 21:30:11 +03:00
2020-03-04 19:44:17 +03:00
# bin package
2021-03-05 16:43:06 +03:00
upx bin/%{name}
2020-03-04 19:44:17 +03:00
2020-02-16 21:30:11 +03:00
%install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%files
%doc README.md LICENSE
%{_bindir}/%{name}
2024-06-24 20:34:31 +00:00
%check
export GOPROXY=direct
go test ./...
%if %{secscan}
clamscan -ir %{buildroot}
%endif
%{buildroot}%{_bindir}/%{name} --version