summaryrefslogtreecommitdiffstats
path: root/office/keepassxc/keepassxc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/keepassxc/keepassxc.SlackBuild')
-rw-r--r--office/keepassxc/keepassxc.SlackBuild50
1 files changed, 33 insertions, 17 deletions
diff --git a/office/keepassxc/keepassxc.SlackBuild b/office/keepassxc/keepassxc.SlackBuild
index 20ab755d1d..2696a9d0f2 100644
--- a/office/keepassxc/keepassxc.SlackBuild
+++ b/office/keepassxc/keepassxc.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for KeePassXC
-# Copyright 2017-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2017-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -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=keepassxc
-VERSION=${VERSION:-2.5.3}
+VERSION=${VERSION:-2.7.7}
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}
@@ -64,38 +75,43 @@ tar xvf $CWD/$PRGNAM-$VERSION-src.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 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
mkdir -p build
-cd build
+(
+ cd build
export LDFLAGS="-ltermcap"
cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_TESTS=OFF \
+ -DWITH_XC_DOCS=${DOCS:-OFF} \
-DWITH_XC_BROWSER=${BROWSER:-ON} \
-DWITH_XC_YUBIKEY=${YUBIKEY:-OFF} \
- -DWITH_XC_NETWORKING=${NETWORKING:-ON} \
-DWITH_XC_AUTOTYPE=${AUTOTYPE:-ON} \
-DWITH_XC_SSHAGENT=${SSHAGENT:-ON} \
- -DWITH_XC_KEESHARE=${KEESHARE:-OFF} \
- -DWITH_XC_KEESHARE_SECURE=${KEESHARE_SECURE:-OFF} \
+ -DWITH_XC_KEESHARE=${KEESHARE:-ON} \
+ -DWITH_XC_NETWORKING=${NETWORKING:-ON} \
+ -DWITH_XC_FDOSECRETS=${FDOSECRETS:-OFF} \
-DWITH_XC_UPDATECHECK=${UPDATECHECK:-ON} \
..
make
make install DESTDIR=$PKG
-cd ..
+)
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/share/man $PKG/usr
-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
+if [ "$DOCS" = "ON" ]; then
+ 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
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
@@ -108,4 +124,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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