summaryrefslogtreecommitdiffstats
path: root/libraries/libtommath/libtommath.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libtommath/libtommath.SlackBuild')
-rw-r--r--libraries/libtommath/libtommath.SlackBuild28
1 files changed, 17 insertions, 11 deletions
diff --git a/libraries/libtommath/libtommath.SlackBuild b/libraries/libtommath/libtommath.SlackBuild
index 20385ad3bb..e0ce66b0dd 100644
--- a/libraries/libtommath/libtommath.SlackBuild
+++ b/libraries/libtommath/libtommath.SlackBuild
@@ -1,19 +1,24 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libtommath
-# 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.
+# 20240315 bkw: Updated for v1.2.1.
+# 20191201 bkw: Updated for v1.2.0.
# 20170903 bkw: Updated for v1.0.1. Changes are incompatible with
# libtommath-1.0, use the previous version of this script if you need
# 1.0 for some odd reason.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libtommath
-VERSION=${VERSION:-1.0.1}
+VERSION=${VERSION:-1.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -23,7 +28,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}
@@ -46,11 +55,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
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 {} \+
# hardcoded lib paths suck
sed -i "s,/lib\$,&$LIBDIRSUFFIX," $PRGNAM.pc.in
@@ -63,7 +69,7 @@ make -f makefile.shared install \
DESTDIR=$PKG
chmod 0644 $PKG/usr/include/*
-rm $PKG/usr/lib$LIBDIRSUFFIX/*.a
+rm -rf $PKG/usr/lib$LIBDIRSUFFIX/*.a $PKG/usr/lib$LIBDIRSUFFIX/*.la
strip $PKG/usr/lib$LIBDIRSUFFIX/*.so.*.*.*
chmod 755 $PKG/usr/lib$LIBDIRSUFFIX/*.so.*.*.*
@@ -77,4 +83,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