summaryrefslogtreecommitdiffstats
path: root/misc/go-md2man/go-md2man.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/go-md2man/go-md2man.SlackBuild')
-rw-r--r--misc/go-md2man/go-md2man.SlackBuild19
1 files changed, 15 insertions, 4 deletions
diff --git a/misc/go-md2man/go-md2man.SlackBuild b/misc/go-md2man/go-md2man.SlackBuild
index 07bf45a4d6..09e9d030e3 100644
--- a/misc/go-md2man/go-md2man.SlackBuild
+++ b/misc/go-md2man/go-md2man.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for go-md2man
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=go-md2man
VERSION=${VERSION:-1.0.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
# The domain part of the go package name, usually the hosting platform
DOMAIN=github.com
@@ -40,7 +43,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -77,6 +87,7 @@ find -L . \
# Point go to the location of the source tree
export GOPATH="$TMP/$PRGNAM-$VERSION"
export GOBIN="$PKG/usr/bin"
+export GO111MODULE="off"
go install -a -x ./...
@@ -93,4 +104,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE