summaryrefslogtreecommitdiffstats
path: root/python/plaso/plaso.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/plaso/plaso.SlackBuild')
-rw-r--r--python/plaso/plaso.SlackBuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/python/plaso/plaso.SlackBuild b/python/plaso/plaso.SlackBuild
index 88294e10d2..e00e10dbed 100644
--- a/python/plaso/plaso.SlackBuild
+++ b/python/plaso/plaso.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for plaso
-# Copyright 2015-2019 Barry Grundy <bgrundy[at]linuxleo.com>
+# Copyright 2015-2023 Barry Grundy <bgrundy[at]linuxleo.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Updated Build version 20190131, March 2019
+# Updated for version 20230717, May 2022
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=plaso
-VERSION=${VERSION:-20190131}
+VERSION=${VERSION:-20230717}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,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}
@@ -70,19 +80,22 @@ 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 {} \;
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
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 ACKNOWLEDGEMENTS AUTHORS LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION/
# Remove duplicated docs in /usr/share/doc
rm -rf $PKG/usr/share
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Copy data files into /usr/share/$PRGNAM
+mkdir -p $PKG/usr/share/$PRGNAM
+cp -a data/. $PKG/usr/share/$PRGNAM/
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