aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-md2man/APKBUILD
blob: be75651ea887bd03b8193166760a284b60d7f86a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Contributor: Jake Buchholz <tomalok@gmail.com>
# Maintainer: Jake Buchholz <tomalok@gmail.com>
pkgname=go-md2man
pkgver=2.0.0
pkgrel=0
pkgdesc="Utility to convert markdown to man pages"
options="net chmod-clean"
url="https://github.com/cpuguy83/go-md2man"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cpuguy83/go-md2man/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/cpuguy83/go-md2man"

build() {
	cd "$srcdir"
	export GOPATH="$PWD"
	mkdir -p $(dirname "$builddir")
	ln -s "$PWD/go-md2man-$pkgver" "$builddir"
	cd $builddir
	CGO_ENABLED=0 go build
}

check() {
	./go-md2man -in go-md2man.1.md -out go-md2man.1
}

package() {
	install -Dsm755 go-md2man "$pkgdir"/usr/bin/go-md2man
	install -Dm644 go-md2man.1 "$pkgdir"/usr/share/man/man1/go-md2man.1
}

sha512sums="22a6c950ca7e386246fadb15f05d0a60437a249df48a7c5f905bc4bd05034cede6318e1158bd2113e97b4fd2d1e838776680a00c6141ac2b3c8795aeee15a39d  go-md2man-2.0.0.tar.gz"