# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/cpuguy83/go-md2man %global goipath github.com/cpuguy83/go-md2man/v2 %global forgeurl https://github.com/cpuguy83/go-md2man Version: 2.0.7 %gometa -L -f Name: go-md2man Release: %autorelease Summary: None # Generated by go-vendor-tools License: BSD-2-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools Provides: golang-github-cpuguy83-md2man = %{version}-%{release} Obsoletes: golang-github-cpuguy83-md2man < 2.0.7-5 %description Converts markdown into roff (man pages). %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 %gobuild -o %{gobuilddir}/bin/go-md2man %{goipath} # generate man %{gobuilddir}/bin/go-md2man -in go-md2man.1.md -out go-md2man.1 %install %go_vendor_license_install -c %{S:2} #install binary install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # install man install -m 0755 -vd %{buildroot}%{_mandir}/man1 install -m 0644 -vp go-md2man.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 README.md go-md2man.1.md %{_bindir}/go-md2man %{_mandir}/man1/go-md2man.1* %changelog %autochangelog