summaryrefslogtreecommitdiffstats
path: root/libraries/libtomcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libtomcrypt')
-rw-r--r--libraries/libtomcrypt/libtomcrypt.SlackBuild63
-rw-r--r--libraries/libtomcrypt/libtomcrypt.info12
-rw-r--r--libraries/libtomcrypt/slack-desc2
3 files changed, 47 insertions, 30 deletions
diff --git a/libraries/libtomcrypt/libtomcrypt.SlackBuild b/libraries/libtomcrypt/libtomcrypt.SlackBuild
index fc0b11d03a..d6a8e0f51e 100644
--- a/libraries/libtomcrypt/libtomcrypt.SlackBuild
+++ b/libraries/libtomcrypt/libtomcrypt.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libtomcrypt
+# Copyright 2023 Steven Voges <Oregon, USA>
# Copyright 2017 Andrzej Telszewski, Banie
# All rights reserved.
#
@@ -23,14 +24,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Multiple ideas shamelessly stolen from libtommath.SlackBuild
-# by B. Watson (yalhcru@gmail.com).
+# by B. Watson (urchlay@slackware.uk).
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libtomcrypt
-VERSION=${VERSION:-1.17}
+VERSION=${VERSION:-1.18.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
-SRCNAM=crypt
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -40,22 +42,30 @@ 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}
+# Use upstream CFLAGS.
if [ "$ARCH" = "i586" ]; then
- # Use upstream CFLAGS.
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- # Use upstream CFLAGS.
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- # Use upstream CFLAGS.
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
- # Use upstream CFLAGS.
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -65,7 +75,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -74,30 +84,37 @@ 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 {} \;
-# Note: -DTFM_DESC is left out, since it requires TomsFastMath.
-# Note: -ltfm is left out, since it requires TomsFastMath.
-CFLAGS="-DGMP_DESC -DLTM_DESC" \
-EXTRALIBS="-lgmp -ltommath" \
-make -f makefile.shared
+# -DTFM_DESC and -DUSE_TFM are left out, since it requires TomsFastMath.
+make -f makefile.shared \
+ CFLAGS="$SLCKFLAGS \
+ -DGMP_DESC \
+ -DLTM_DESC \
+ -DUSE_GMP \
+ -DUSE_LTM"
make -f makefile.shared install \
+ PREFIX=/usr \
LIBPATH=/usr/lib$LIBDIRSUFFIX \
- INSTALL_USER=root \
- INSTALL_GROUP=root \
+ INCPATH=/usr/include \
+ DATAPATH=/usr/data \
+ BINPATH=/usr/bin \
DESTDIR=$PKG
-chmod 0644 $PKG/usr/include/*.h
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
-strip --strip-unneeded $PKG/usr/lib$LIBDIRSUFFIX/*.so.*.*.*
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+chmod 0755 $PKG/usr/lib$LIBDIRSUFFIX/*.so.*.*.*
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a demos doc/crypt.pdf notes changes LICENSE README TODO \
+cp -a \
+ demos doc/crypt.tex notes LICENSE README.md changes \
$PKG/usr/doc/$PRGNAM-$VERSION
-rmdir $PKG/usr/doc/$PRGNAM-$VERSION/demos/test
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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
diff --git a/libraries/libtomcrypt/libtomcrypt.info b/libraries/libtomcrypt/libtomcrypt.info
index 83064b9cd8..45edf734f7 100644
--- a/libraries/libtomcrypt/libtomcrypt.info
+++ b/libraries/libtomcrypt/libtomcrypt.info
@@ -1,10 +1,10 @@
PRGNAM="libtomcrypt"
-VERSION="1.17"
-HOMEPAGE="https://www.libtom.net/LibTomCrypt/"
-DOWNLOAD="https://github.com/libtom/libtomcrypt/releases/download/1.17/crypt-1.17.tar.bz2"
-MD5SUM="cea7e5347979909f458fe7ebb5a44f85"
+VERSION="1.18.2"
+HOMEPAGE="https://www.libtom.net/LibTomCrypt"
+DOWNLOAD="https://github.com/libtom/libtomcrypt/archive/v1.18.2/libtomcrypt-1.18.2.tar.gz"
+MD5SUM="f1df9351e2944d2ecb76166516a7ca1f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libtommath"
-MAINTAINER="Andrzej Telszewski"
-EMAIL="atelszewski@gmail.com"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"
diff --git a/libraries/libtomcrypt/slack-desc b/libraries/libtomcrypt/slack-desc
index dbf994307d..f1e79d1bca 100644
--- a/libraries/libtomcrypt/slack-desc
+++ b/libraries/libtomcrypt/slack-desc
@@ -14,6 +14,6 @@ libtomcrypt: array of well known published block ciphers, one-way hash
libtomcrypt: functions, chaining modes, pseudo-random number generators,
libtomcrypt: public key cryptography and a plethora of other routines.
libtomcrypt:
-libtomcrypt: Homepage: https://www.libtom.net/LibTomCrypt/
+libtomcrypt: Homepage: https://www.libtom.net/LibTomCrypt
libtomcrypt:
libtomcrypt: