]>
Commit | Line | Data |
---|---|---|
5856629b ER |
1 | Summary: Process markdown into manpages |
2 | Name: go-md2man | |
610b7652 | 3 | Version: 1.0.10 |
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 | |
610b7652 | 8 | # Source0-md5: 2f2ab80cbee456548790449a26cc2edc |
5856629b | 9 | URL: https://github.com/cpuguy83/go-md2man |
cbc10dd1 JP |
10 | BuildRequires: golang |
11 | BuildRequires: golang-github-russross-blackfriday-devel | |
532e2967 | 12 | ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x |
5856629b ER |
13 | |
14 | %define _enable_debug_packages 0 | |
610b7652 | 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 | ||
24 | mkdir -p src/github.com/cpuguy83 | |
25 | ln -s ../../../ src/github.com/cpuguy83/go-md2man | |
26 | ||
27 | %build | |
610b7652 | 28 | export GOCACHE=$(pwd)/.go-cache |
5856629b ER |
29 | |
30 | %gobuild -o bin/go-md2man github.com/cpuguy83/go-md2man | |
31 | ||
32 | bin/go-md2man -in=go-md2man.1.md -out=go-md2man.1 | |
33 | ||
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} | |
37 | cp -p bin/go-md2man $RPM_BUILD_ROOT%{_bindir} | |
38 | install -p go-md2man.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %files | |
44 | %defattr(644,root,root,755) | |
45 | %doc README.md LICENSE.md | |
46 | %attr(755,root,root) %{_bindir}/go-md2man | |
47 | %{_mandir}/man1/*.1* |