]> git.t-rg.ws Git - slackbuilds.git/commitdiff
Botan3: added
authorfsLeg <fsleg@t-rg.ws>
Sat, 4 Oct 2025 14:33:51 +0000 (17:33 +0300)
committerfsLeg <fsleg@t-rg.ws>
Sat, 4 Oct 2025 14:33:51 +0000 (17:33 +0300)
Botan3/Botan3.SlackBuild [new file with mode: 0644]
Botan3/Botan3.info [new file with mode: 0644]
Botan3/README [new file with mode: 0644]
Botan3/slack-desc [new file with mode: 0644]

diff --git a/Botan3/Botan3.SlackBuild b/Botan3/Botan3.SlackBuild
new file mode 100644 (file)
index 0000000..22c4cef
--- /dev/null
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+# Slackware build script for Botan3
+
+# Copyright 2025 Vladislav 'fsLeg' Borisov, Moscow, Russia
+# Copyright (c) 2023-2025  Gregory J. L. Tourte <artourter@gmail.com>
+# Copyright (c) 2010-2022  Markus Reichelt, Aachen, DE
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=Botan3
+VERSION=${VERSION:-3.9.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-fsleg}
+PKGTYPE=${PKGTYPE:-txz}
+
+if [ -z "$ARCH" ]; then
+  case "$( uname -m )" in
+    i?86) ARCH=i586 ;;
+    arm*) ARCH=arm ;;
+    *) ARCH=$( uname -m ) ;;
+  esac
+fi
+
+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}
+
+if [ "$ARCH" = "i586" ]; then
+  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2 -fPIC"
+  LIBDIRSUFFIX="64"
+else
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf ${PRGNAM%3}-$VERSION
+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 {} +
+
+if [ "${TPM:-NO}" = 'YES' ]; then
+  TPMFLAG="--with-tpm"
+fi
+
+if [ "${TPM2:-NO}" = "YES" ]; then
+  TPM2FLAG="--with-tpm2"
+fi
+
+LDFLAGS="$LDFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+python3 configure.py \
+  --prefix=/usr \
+  --docdir=doc \
+  --libdir=lib$LIBDIRSUFFIX \
+  --mandir=/usr/man \
+  --disable-static \
+  --with-rst2man \
+  --with-bzip2 \
+  --with-zlib \
+  --with-lzma \
+  --with-boost \
+  --with-sqlite3 \
+  --with-commoncrypto \
+  --program-suffix=3 \
+  $TPMFLAG \
+  $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
+
+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/
+
+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
diff --git a/Botan3/Botan3.info b/Botan3/Botan3.info
new file mode 100644 (file)
index 0000000..5cad611
--- /dev/null
@@ -0,0 +1,10 @@
+PRGNAM="Botan3"
+VERSION="3.9.0"
+HOMEPAGE="https://botan.randombit.net/"
+DOWNLOAD="https://botan.randombit.net/releases/Botan-3.9.0.tar.xz"
+MD5SUM="aa156fc96877565b755f804fc57e8475"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Vladislav 'fsLeg' Borisov"
+EMAIL="fsleg@t-rg.ws"
diff --git a/Botan3/README b/Botan3/README
new file mode 100644 (file)
index 0000000..81300cb
--- /dev/null
@@ -0,0 +1,15 @@
+Botan is a BSD-licensed crypto library for C++. It provides applications
+with the ability to use a number of cryptographic algorithms, as well as
+SSL/TLS, X.509 certificates and CRLs, PKCS #10 certificate requests, a
+filter/pipe message processing system, and a wide variety of other
+features.
+
+Botan relies on Python3 for its compilation configuration.
+
+To build TPM support, use `TPM=YES`. This option adds a dependency on
+`system/trousers`.
+
+To build TPM2 support, use `TPM2=YES`. This option adds a dependency on
+tpm2-tss (not on SBo).
+
+This package can be safely installed alongside Botan.
diff --git a/Botan3/slack-desc b/Botan3/slack-desc
new file mode 100644 (file)
index 0000000..65e0798
--- /dev/null
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+      |-----handy-ruler------------------------------------------------------|
+Botan3: Botan3 (C++ crypto library)
+Botan3:
+Botan3: Botan is a BSD-licensed crypto library for C++. It provides
+Botan3: applications with the ability to use a number of cryptographic
+Botan3: algorithms, as well as SSL/TLS, X.509 certificates and CRLs, PKCS
+Botan3: #10 certificate requests, a filter/pipe message processing system,
+Botan3: and a wide variety of other features.
+Botan3:
+Botan3: Homepage: https://botan.randombit.net/
+Botan3:
+Botan3: