From 33ea0491bf0df0d13ccc665b6bce922f292056a0 Mon Sep 17 00:00:00 2001 From: Xiang Fan Date: Fri, 16 Feb 2018 00:09:16 +0800 Subject: [PATCH] go_md2man: new recipe (#2079) --- dev-go/go-md2man/go_md2man-1.0.7.recipe | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dev-go/go-md2man/go_md2man-1.0.7.recipe diff --git a/dev-go/go-md2man/go_md2man-1.0.7.recipe b/dev-go/go-md2man/go_md2man-1.0.7.recipe new file mode 100644 index 000000000..0c7902350 --- /dev/null +++ b/dev-go/go-md2man/go_md2man-1.0.7.recipe @@ -0,0 +1,64 @@ +SUMMARY="A utility to convert markdown to man pages" +DESCRIPTION="go-md2man converts standard markdown formatted documents \ +into manpages. It is written purely in Go so as to reduce dependencies \ +on 3rd party libs." +HOMEPAGE="https://github.com/cpuguy83/go-md2man" +COPYRIGHT="2017 Brian Goff + 2017 Russ Ross" +LICENSE="MIT + BSD (2-clause)" +REVISION="1" +SOURCE_URI="https://github.com/cpuguy83/go-md2man/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="108e4503fed96aa33fc89e98f8cca8f0ac2c3f79d272999463bacdaedf3606ac" +SOURCE_DIR="go-md2man-$portVersion" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" + +PROVIDES=" + go_md2man = $portVersion + cmd:go_md2man = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:gcc + cmd:git + cmd:go + cmd:make + cmd:makeinfo + cmd:which + " + +BUILD() +{ + # setup go environment + BUILD=$(pwd)/../build + BUILD_GOPATH=$BUILD/gopath + BUILD_GOROOT=$BUILD/goroot + + rm -rf $BUILD + mkdir -p $BUILD_GOPATH/bin $BUILD_GOPATH/src $BUILD_GOROOT + cp -R -s $(go env GOROOT)/* $BUILD_GOROOT + + export GOPATH=$BUILD_GOPATH + export GOROOT=$BUILD_GOROOT + export PATH=$PATH:$GOPATH/bin + + # copy source + mkdir -p $GOPATH/src/github.com/cpuguy83/go-md2man + cp -R -s $(pwd)/* $GOPATH/src/github.com/cpuguy83/go-md2man + cp -R -s $(pwd)/vendor/* $GOPATH/src + + go get github.com/cpuguy83/go-md2man +} + +INSTALL() +{ + install -d $binDir + install ../build/gopath/bin/go-md2man $binDir +}