2022-11-12 14:54:42 +00:00
|
|
|
# Generated by go2rpm 1.8.2
|
2019-06-24 15:00:47 +00:00
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
# https://github.com/cpuguy83/go-md2man
|
|
|
|
%global goipath github.com/cpuguy83/go-md2man
|
2023-10-12 08:34:28 +00:00
|
|
|
Version: 2.0.3
|
2019-06-24 15:00:47 +00:00
|
|
|
|
|
|
|
%gometa
|
|
|
|
|
2020-07-25 17:35:44 +00:00
|
|
|
%global goaltipaths github.com/cpuguy83/go-md2man/v2
|
2019-07-05 03:55:20 +00:00
|
|
|
|
2019-06-24 15:00:47 +00:00
|
|
|
%global common_description %{expand:
|
|
|
|
Converts markdown into roff (man pages).}
|
|
|
|
|
|
|
|
%global golicenses LICENSE.md
|
2022-11-12 14:54:42 +00:00
|
|
|
%global godocs README.md go-md2man.1.md
|
2019-06-24 15:00:47 +00:00
|
|
|
|
|
|
|
Name: %{goname}
|
2021-09-13 14:48:05 +00:00
|
|
|
Release: %autorelease
|
2019-06-24 15:00:47 +00:00
|
|
|
Summary: Converts markdown into roff (man pages)
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
URL: %{gourl}
|
|
|
|
Source0: %{gosource}
|
|
|
|
|
2019-06-27 16:13:55 +00:00
|
|
|
Provides: go-md2man = %{version}-%{release}
|
2019-06-24 15:00:47 +00:00
|
|
|
|
2022-11-12 14:54:42 +00:00
|
|
|
%description %{common_description}
|
2019-06-24 15:00:47 +00:00
|
|
|
|
|
|
|
%gopkg
|
|
|
|
|
|
|
|
%prep
|
2023-07-05 18:59:32 +00:00
|
|
|
%if %{defined rhel}
|
|
|
|
%goprep -k
|
|
|
|
# unpack vendored dependencies to GOPATH
|
|
|
|
tar c -C vendor/ . | tar x -C %{gobuilddir}/src
|
|
|
|
%else
|
2019-06-24 15:00:47 +00:00
|
|
|
%goprep
|
|
|
|
|
2022-11-12 14:54:42 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%go_generate_buildrequires
|
2023-07-05 18:59:32 +00:00
|
|
|
%endif
|
2022-11-12 14:54:42 +00:00
|
|
|
|
2019-06-24 15:00:47 +00:00
|
|
|
%build
|
|
|
|
%gobuild -o %{gobuilddir}/bin/go-md2man %{goipath}
|
2022-04-27 18:43:49 +00:00
|
|
|
%{gobuilddir}/bin/go-md2man -in go-md2man.1.md -out go-md2man.1
|
2019-06-24 15:00:47 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%gopkginstall
|
|
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
|
|
2022-04-27 18:43:49 +00:00
|
|
|
install -Dpm 0644 go-md2man.1 -t %{buildroot}%{_mandir}/man1/
|
|
|
|
|
2019-06-24 15:00:47 +00:00
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%gocheck
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
2023-07-05 18:59:32 +00:00
|
|
|
%license LICENSE.md %{?rhel:vendor/modules.txt}
|
2022-04-27 18:43:49 +00:00
|
|
|
%doc go-md2man.1.md README.md
|
2019-06-24 15:00:47 +00:00
|
|
|
%{_bindir}/*
|
2022-04-27 18:43:49 +00:00
|
|
|
%{_mandir}/man1/go-md2man.1*
|
2019-06-24 15:00:47 +00:00
|
|
|
|
|
|
|
%gopkgfiles
|
|
|
|
|
|
|
|
%changelog
|
2022-04-27 18:43:49 +00:00
|
|
|
%autochangelog
|