From 3bd24cb5a6f2b8e1bbc27a11c83c861c7e8c9ca5 Mon Sep 17 00:00:00 2001 From: Jake Buchholz <tomalok@gmail.com> Date: Thu, 10 Jan 2019 02:01:58 +0000 Subject: [PATCH] community/go-md2man: new aport Adding an explicit go-md2man package, as a number of other packages (runc, containerd, docker, etc.) are building it for the sole purpose of converting markdown documentation to man pages... (often with 'go get', which has raised some unanswered questions.) --- community/go-md2man/APKBUILD | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 community/go-md2man/APKBUILD diff --git a/community/go-md2man/APKBUILD b/community/go-md2man/APKBUILD new file mode 100644 index 000000000000..e60ca8a38b8d --- /dev/null +++ b/community/go-md2man/APKBUILD @@ -0,0 +1,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" -- GitLab