diff options
Diffstat (limited to 'system/makepp/makepp.SlackBuild')
-rw-r--r-- | system/makepp/makepp.SlackBuild | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/system/makepp/makepp.SlackBuild b/system/makepp/makepp.SlackBuild index ff1891ebab..5cad881028 100644 --- a/system/makepp/makepp.SlackBuild +++ b/system/makepp/makepp.SlackBuild @@ -2,23 +2,25 @@ # 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 -# 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 @@ -34,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 - -gzip -9 $PKG/usr/man/man1/*.1 + $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 + +# 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 |