aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-md2man/APKBUILD
blob: e60ca8a38b8d8532e58b2f4db9c51710dae8a5f8 (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
35
36
# Contributor: Jake Buchholz <tomalok@gmail.com>
# Maintainer: Jake Buchholz <tomalok@gmail.com>

pkgname=go-md2man
pkgver=1.0.8
pkgrel=0
pkgdesc="Utility to convert markdown to man pages"
url="https://github.com/cpuguy83/go-md2man"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="go-md2man-$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() {
	cd "$builddir"
	./go-md2man -in go-md2man.1.md -out go-md2man.1
}

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

sha512sums="4c52e01c9b07582b5d55d1e94935378a676bd284a3e8230a8a191d4678b1b6ae92b704a249117c542832170069a70c649e58a1752fb2973709259b5bc108db91  go-md2man-1.0.8.tar.gz"