1 Summary: Process markdown into manpages
6 Group: Development/Tools
7 Source0: https://github.com/cpuguy83/go-md2man/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 2f2ab80cbee456548790449a26cc2edc
9 URL: https://github.com/cpuguy83/go-md2man
11 BuildRequires: golang-github-russross-blackfriday-devel
12 BuildRequires: rpmbuild(macros) >= 2.009
13 ExclusiveArch: %go_arches
15 %define _enable_debug_packages 0
16 %define gobuild(o:) %__go build -mod=vendor -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
19 go-md2man is a golang tool using blackfriday to process markdown into
25 mkdir -p src/github.com/cpuguy83
26 ln -s ../../../ src/github.com/cpuguy83/go-md2man
29 export GOCACHE=$(pwd)/.go-cache
31 %gobuild -o bin/go-md2man github.com/cpuguy83/go-md2man
33 bin/go-md2man -in=go-md2man.1.md -out=go-md2man.1
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
38 cp -p bin/go-md2man $RPM_BUILD_ROOT%{_bindir}
39 install -p go-md2man.1 $RPM_BUILD_ROOT%{_mandir}/man1
42 rm -rf $RPM_BUILD_ROOT
45 %defattr(644,root,root,755)
46 %doc README.md LICENSE.md
47 %attr(755,root,root) %{_bindir}/go-md2man