]> git.t-rg.ws Git - slackbuilds.git/commitdiff
Botan3: brought the script in more accordance with the template
authorfsLeg <fsleg@t-rg.ws>
Sat, 4 Oct 2025 14:46:56 +0000 (17:46 +0300)
committerfsLeg <fsleg@t-rg.ws>
Sat, 4 Oct 2025 14:46:56 +0000 (17:46 +0300)
Botan3/Botan3.SlackBuild

index 22c4cef48f77a62484a9b3fb0041328033b02229..6f49366048c70f4266ee28fee65f00cbb5f8b464 100644 (file)
@@ -36,7 +36,7 @@ if [ -z "$ARCH" ]; then
   case "$( uname -m )" in
     i?86) ARCH=i586 ;;
     arm*) ARCH=arm ;;
-    *) ARCH=$( uname -m ) ;;
+       *) ARCH=$( uname -m ) ;;
   esac
 fi
 
@@ -58,6 +58,9 @@ elif [ "$ARCH" = "i686" ]; then
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+  SLKCFLAGS="-O2 -fPIC"
+  LIBDIRSUFFIX="64"
 else
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
@@ -73,10 +76,12 @@ tar xvf $CWD/${PRGNAM%3}-$VERSION.tar.xz
 cd ${PRGNAM%3}-$VERSION
 chown -R root:root .
 find -L . \
-  -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
-  \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+ \( -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 {} \;
 
-if [ "${TPM:-NO}" = 'YES' ]; then
+if [ "${TPM:-NO}" = "YES" ]; then
   TPMFLAG="--with-tpm"
 fi
 
@@ -84,7 +89,6 @@ if [ "${TPM2:-NO}" = "YES" ]; then
   TPM2FLAG="--with-tpm2"
 fi
 
-LDFLAGS="$LDFLAGS" \
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 python3 configure.py \
@@ -105,20 +109,18 @@ python3 configure.py \
   $TPM2FLAG
 
 make
-#make check
-#as an alternative way to invoke the testsuite uncomment the following
-#LD_LIBRARY_PATH=. ./botan-test
-
 make install DESTDIR=$PKG
 
 mv $PKG/usr/man/man1/botan.1 $PKG/usr/man/man1/botan3.1
-gzip -9 $PKG/usr/man/man*/*
 
 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
 
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
 mv $PKG/usr/doc/$(echo $PRGNAM | sed 's/^B/\L&/;s/3$//')-$VERSION $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a license.txt $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a license.txt readme.rst $PKG/usr/doc/$PRGNAM-$VERSION/
 
 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild