summaryrefslogtreecommitdiffstats
path: root/libraries/olm/olm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/olm/olm.SlackBuild')
-rw-r--r--libraries/olm/olm.SlackBuild42
1 files changed, 26 insertions, 16 deletions
diff --git a/libraries/olm/olm.SlackBuild b/libraries/olm/olm.SlackBuild
index b11f08a58c..4cf9ad442d 100644
--- a/libraries/olm/olm.SlackBuild
+++ b/libraries/olm/olm.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for olm
+# Copyright 2022 Roger Krowiak
# Copyright 2020 David O'Shaughnessy
# All rights reserved.
#
@@ -22,10 +23,13 @@
# 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=olm
-VERSION=${VERSION:-3.2.1}
+VERSION=${VERSION:-3.2.14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,21 +80,20 @@ 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 {} \;
-cmake . \
- -Bbuild \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
- -DCMAKE_BUILD_TYPE=Release
-cmake --build build
-cd build/tests
-ctest .
-cd ..
+mkdir -p build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DCMAKE_FIND_USE_PACKAGE_ROOT_PATH=OFF \
+ -DCMAKE_BUILD_TYPE=Release ..
+make
+( cd tests ; ctest . )
make install DESTDIR=$PKG
cd ..
-# Strip binaries and libraries
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
@@ -98,4 +108,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