]>
Commit | Line | Data |
---|---|---|
5856629b ER |
1 | Summary: Process markdown into manpages |
2 | Name: go-md2man | |
6153080f | 3 | Version: 2.0.2 |
cbc10dd1 | 4 | Release: 1 |
5856629b ER |
5 | License: MIT |
6 | Group: Development/Tools | |
7 | Source0: https://github.com/cpuguy83/go-md2man/archive/v%{version}/%{name}-%{version}.tar.gz | |
6153080f | 8 | # Source0-md5: afd343ecba3ad16ee7261d4a95869894 |
5856629b | 9 | URL: https://github.com/cpuguy83/go-md2man |
6153080f | 10 | BuildRequires: golang >= 1.11 |
89ef1ce2 JP |
11 | BuildRequires: rpmbuild(macros) >= 2.009 |
12 | ExclusiveArch: %go_arches | |
5856629b ER |
13 | |
14 | %define _enable_debug_packages 0 | |
89ef1ce2 | 15 | %define gobuild(o:) %__go build -mod=vendor -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; |
5856629b ER |
16 | |
17 | %description | |
18 | go-md2man is a golang tool using blackfriday to process markdown into | |
19 | manpages. | |
20 | ||
21 | %prep | |
22 | %setup -q | |
23 | ||
5856629b | 24 | %build |
6153080f | 25 | %gobuild -o bin/go-md2man github.com/cpuguy83/go-md2man/v2 |
5856629b ER |
26 | |
27 | bin/go-md2man -in=go-md2man.1.md -out=go-md2man.1 | |
28 | ||
29 | %install | |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} | |
32 | cp -p bin/go-md2man $RPM_BUILD_ROOT%{_bindir} | |
33 | install -p go-md2man.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
34 | ||
35 | %clean | |
36 | rm -rf $RPM_BUILD_ROOT | |
37 | ||
38 | %files | |
39 | %defattr(644,root,root,755) | |
40 | %doc README.md LICENSE.md | |
41 | %attr(755,root,root) %{_bindir}/go-md2man | |
42 | %{_mandir}/man1/*.1* |