summaryrefslogtreecommitdiffstats
path: root/system/makepp/makepp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/makepp/makepp.SlackBuild')
-rw-r--r--system/makepp/makepp.SlackBuild53
1 files changed, 37 insertions, 16 deletions
diff --git a/system/makepp/makepp.SlackBuild b/system/makepp/makepp.SlackBuild
index a9758a50cc..5cad881028 100644
--- a/system/makepp/makepp.SlackBuild
+++ b/system/makepp/makepp.SlackBuild
@@ -1,19 +1,31 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for makepp
-# 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.
+# 20220316 bkw: derp. fix broken symlinks.
+# 20210824 bkw: update for v2.0.99.2, aka 2.1rc1, because 2.0 won't
+# build on -current and other distros have been shipping 2.1 betas and
+# release candidates for years now.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=makepp
-VERSION=${VERSION:-2.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.0.99.2}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-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}
@@ -24,32 +36,41 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
+tar xvf $CWD/$PRGNAM-$VERSION.t?z
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# Most of the executables have 2 names each, short and long, e.g. mpp
# and makepp. install.pl installs them as hardlinks, which is kinda weird
# for a Slack package. Not sure they'd cause any problems, but I *know*
# symlinks work correctly, so:
-sed -i 's,^ *link\>,symlink,' install.pl
+sed -i \
+ -e 's,^ *link\>,symlink,' \
+ install.pl
# configure/make is just a wrapper around install.pl. Skip the tests,
# because they spam /usr/include and don't even clean up after themselves.
+PERL5LIB="$( pwd )" \
perl install.pl \
/usr/bin \
/usr/share/$PRGNAM \
/usr/man \
- /usr/doc/$PRGNAM-$VERSION \
+ /usr/doc/$PRGNAM-$VERSION/html \
none \
- $PKG/usr
+ $PKG
+
+# 20220316 bkw: install.pl's symlinks are absolute, pointing to $PKG.
+# Make them relative. This code only works because the link targets
+# are in the same directories as the links.
+for link in $( find -P $PKG -type l); do
+ target="$( realpath $link )"
+ rm -f $link; ln -s $( basename $target ) $link
+done
-gzip -9 $PKG/usr/man/man1/*.1
+# in 2.0.99.2, they're already gzipped.
+#gzip -9 $PKG/usr/man/man1/*.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ChangeLog LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
@@ -59,4 +80,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