# Generated by go2rpm 1.3
%bcond_without check
# https://github.com/FiloSottile/age
%global goipath filippo.io/age
%global forgeurl https://github.com/FiloSottile/age
Version: 1.0.0
%gometa
%global goname age
%global common_description %{expand:
A simple, modern and secure encryption tool (and Go library) with small
explicit keys, no config options, and UNIX-style composability.}
%global golicenses LICENSE
%global godocs README.md
Name: %{goname}
Release: %autorelease
Summary: Simple, modern and secure encryption tool
# Upstream license specification: BSD-3-Clause
License: BSD
URL: %{gourl}
Source0: %{gosource}
BuildRequires: golang(filippo.io/edwards25519)
BuildRequires: golang(golang.org/x/crypto/chacha20poly1305)
BuildRequires: golang(golang.org/x/crypto/cryptobyte)
BuildRequires: golang(golang.org/x/crypto/curve25519)
BuildRequires: golang(golang.org/x/crypto/hkdf)
BuildRequires: golang(golang.org/x/crypto/poly1305)
BuildRequires: golang(golang.org/x/crypto/scrypt)
BuildRequires: golang(golang.org/x/crypto/ssh)
BuildRequires: golang(golang.org/x/crypto/ssh/terminal)
%description
%{common_description}
%gopkg
%prep
%goprep
%build
export LDFLAGS="-X main.Version=%{version} "
for cmd in cmd/* ; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%install
%gopkginstall
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/
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%{_mandir}/man1/*
%gopkgfiles
%changelog
%autochangelog