75 lines
1.9 KiB
RPMSpec
75 lines
1.9 KiB
RPMSpec
# Generated by go2rpm 1.18.0
|
|
%bcond check 1
|
|
|
|
# https://github.com/FiloSottile/age
|
|
%global goipath filippo.io/age
|
|
%global forgeurl https://github.com/FiloSottile/age
|
|
Version: 1.3.1
|
|
|
|
%gometa -L -f
|
|
|
|
|
|
Name: age
|
|
Release: %autorelease
|
|
Summary: Simple, modern and secure encryption tool
|
|
|
|
# Generated by go-vendor-tools
|
|
# https://github.com/C2SP/CCTV/issues/14
|
|
# vendor/c2sp.org/CCTV/age/internal is not packaged
|
|
License: BSD-3-Clause AND (0BSD OR CC0-1.0 OR Unlicense)
|
|
URL: %{gourl}
|
|
Source0: %{gosource}
|
|
# Generated by go-vendor-tools
|
|
Source1: %{archivename}-vendor.tar.bz2
|
|
Source2: go-vendor-tools.toml
|
|
|
|
BuildRequires: go-vendor-tools
|
|
|
|
%description
|
|
A simple, modern and secure encryption tool (and Go library) with small
|
|
explicit keys, no config options, and UNIX-style composability.
|
|
|
|
%prep
|
|
%goprep -A
|
|
%setup -q -T -D -a1 %{forgesetupargs}
|
|
%autopatch -p1
|
|
|
|
%generate_buildrequires
|
|
%go_vendor_license_buildrequires -c %{S:2}
|
|
|
|
%build
|
|
%global gomodulesmode GO111MODULE=on
|
|
GO_LDFLAGS="-X main.Version=%{version}"
|
|
for cmd in cmd/{age,age-keygen,age-inspect} ; do
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
done
|
|
|
|
%install
|
|
%go_vendor_license_install -c %{S:2}
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
install -m 644 doc/%{name}.1 %{buildroot}%{_mandir}/man1/
|
|
install -m 644 doc/age-keygen.1 %{buildroot}%{_mandir}/man1/
|
|
install -m 644 doc/age-inspect.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
%check
|
|
%go_vendor_license_check -c %{S:2}
|
|
%if %{with check}
|
|
%gotest ./...
|
|
%endif
|
|
|
|
%files -f %{go_vendor_license_filelist}
|
|
%license vendor/modules.txt
|
|
%doc doc README.md
|
|
%{_bindir}/age
|
|
%{_bindir}/age-inspect
|
|
%{_bindir}/age-keygen
|
|
%{_mandir}/man1/age.1*
|
|
%{_mandir}/man1/age-inspect.1*
|
|
%{_mandir}/man1/age-keygen.1*
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|