summaryrefslogtreecommitdiffstats
path: root/system/makefile2graph/makefile2graph.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/makefile2graph/makefile2graph.SlackBuild')
-rw-r--r--system/makefile2graph/makefile2graph.SlackBuild26
1 files changed, 19 insertions, 7 deletions
diff --git a/system/makefile2graph/makefile2graph.SlackBuild b/system/makefile2graph/makefile2graph.SlackBuild
index 366e81ff41..b58d1d7c1d 100644
--- a/system/makefile2graph/makefile2graph.SlackBuild
+++ b/system/makefile2graph/makefile2graph.SlackBuild
@@ -1,15 +1,20 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for makefile2graph
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20220611 bkw: updated for v2021.11.06.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=makefile2graph
-VERSION=${VERSION:-1.5.0}
+VERSION=${VERSION:-2021.11.06}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,7 +24,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -49,14 +58,17 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod 644 *
-make -j1 \
+# 20210824 bkw: fix parallel build. not that helpful really since
+# there's only one source file to compile anyway.
+sed -i '/^install:/s,$, all,' Makefile
+
+make \
CFLAGS="$SLKCFLAGS -Wl,-s" DESTDIR=$PKG \
prefix=/usr man1dir=/usr/man/man1 pkgdocdir=/usr/doc/$PRGNAM-$VERSION \
all install
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* $PKG/usr/man/man1/*
gzip -9 $PKG/usr/man/man1/*.1
-ln -s make2graph.1.gz $PKG/usr/man/man1/$PRGNAM.1.gz
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -64,4 +76,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