diff options
Diffstat (limited to 'network/zeek/zeek.SlackBuild')
-rw-r--r-- | network/zeek/zeek.SlackBuild | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/network/zeek/zeek.SlackBuild b/network/zeek/zeek.SlackBuild index 6ce082a95f..ea2b1cdfaa 100644 --- a/network/zeek/zeek.SlackBuild +++ b/network/zeek/zeek.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Zeek -# Copyright 2018-2019 Michael Edie Orlando, FL USA +# Copyright 2018-2024 Michael Edie, Tampa, FL USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,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=zeek -VERSION=${VERSION:-3.0.0} +VERSION=${VERSION:-6.0.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,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} @@ -62,17 +72,24 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION + chown -R root:root . -find -L . \ +# -L bails out because of a loop +find . \ \( -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 {} \; +make distclean + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ - --prefix=/opt/$PRGNAM + --prefix=/opt/$PRGNAM \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man make make install DESTDIR=$PKG @@ -82,11 +99,16 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr BIN="zeek zeek-config zeekctl zeek-cut capstats trace-summary" mkdir -p $PKG/usr/bin -for i in $BIN - do ln -sf /opt/$PRGNAM/bin/$i $PKG/usr/bin/$i -done +( + cd $PKG/usr/bin + for i in $BIN + do ln -sf ../../opt/$PRGNAM/bin/$i $i + done +) + +find -L $PKG -type l 2>&1 | grep loop | iconv -t 8859_1//TRANSLIT | + cut -d"'" -f2 | xargs rm -v || true -mv $PKG/opt/$PRGNAM/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 @@ -98,4 +120,6 @@ 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} +rm -f opt/zeek/include/zeek/builtin-plugins/spicy-plugin/usr/lib$LIBDIRSUFFIX/zeek-spicy + +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |