Blob Blame History Raw
# Generated by go2rpm 1
%bcond_without check

# https://github.com/zmap/zcertificate
%global goipath         github.com/zmap/zcertificate
Version:                0.0.1

%gometa

%global common_description %{expand:
ZCertificate parses X.509 certificates and runs ZLint.}

%global golicenses      LICENSE
%global godocs          README.md

Name:           %{goname}
Release:        1%{?dist}
Summary:        Command line utility for parsing certificates

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/sirupsen/logrus)
BuildRequires:  golang(github.com/zmap/zcrypto/x509)
BuildRequires:  golang(github.com/zmap/zlint/v3)
BuildRequires:  help2man

%if %{with check}
# Tests
BuildRequires:  golang(github.com/zmap/zcrypto/data/test/certificates)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep

%build
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}/
install -m 0755 -vd                     %{buildroot}%{_mandir}/man1
pushd %{buildroot}%{_bindir}
help2man --no-discard-stderr --no-info --version-string=1 ./zcertificate --output=%{buildroot}%{_mandir}/man1/zcertificate.1
popd

%if %{with check}
%check
%gocheck
%endif

%files
%license LICENSE
%doc README.md
%{_bindir}/*
%{_mandir}/man1/zcertificate.1*

%gopkgfiles

%changelog
* Wed Jan 13 18:56:49 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0.0.1-1
- Update to 0.0.1

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Aug 01 15:26:45 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20190819git30e3881
- Initial package