summaryrefslogtreecommitdiffstats
path: root/system/mpack/mpack.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/mpack/mpack.SlackBuild')
-rw-r--r--system/mpack/mpack.SlackBuild28
1 files changed, 23 insertions, 5 deletions
diff --git a/system/mpack/mpack.SlackBuild b/system/mpack/mpack.SlackBuild
index 9bd52bc85f..cc7d94aa3e 100644
--- a/system/mpack/mpack.SlackBuild
+++ b/system/mpack/mpack.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for mpack
@@ -21,11 +21,20 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# 2021-03-18
+# - Inc'd BUILD value to 2
+# - Added comments about patch usage.
+# - Legacy upstream URL is gone, migrated to gitlab site.
+#
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mpack
VERSION=${VERSION:-1.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +44,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}
@@ -69,7 +85,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p1 < $CWD/mpack.diff
+# The following patch corrects a number of warnings and build errors in
+# order to compile on a modern (Slackware 14.2+) Linux system.
+patch -p1 < $CWD/mpack.patch
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -97,4 +115,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