summaryrefslogtreecommitdiffstats
path: root/system/ossec-agent/ossec-agent.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ossec-agent/ossec-agent.SlackBuild')
-rw-r--r--system/ossec-agent/ossec-agent.SlackBuild22
1 files changed, 18 insertions, 4 deletions
diff --git a/system/ossec-agent/ossec-agent.SlackBuild b/system/ossec-agent/ossec-agent.SlackBuild
index fa24c687ef..4f0bdae9de 100644
--- a/system/ossec-agent/ossec-agent.SlackBuild
+++ b/system/ossec-agent/ossec-agent.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ossec-agent
-# Copyright 2016 Mario Preksavec, Zagreb, Croatia
+# Copyright 2016, 2020 Mario Preksavec, Zagreb, Croatia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Special thanks to Jason Graham for patches and testing
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ossec-agent
VERSION=${VERSION:-3.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=ossec-hids
@@ -37,7 +42,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}
@@ -114,6 +126,8 @@ 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 {} \;
+patch -p1 < $CWD/gcc-fno-common-3.6.0.patch
+
# Makefile fixes
sed -e 's|\(./init/adduser.sh.*\)|#\1|' \
-e 's|\(DEFINES+=-DDEFAULTDIR=\).*|\1\\"/var/ossec\\"|' \
@@ -161,4 +175,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