summaryrefslogtreecommitdiff
path: root/network/haproxy/haproxy.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/haproxy/haproxy.SlackBuild')
-rw-r--r--network/haproxy/haproxy.SlackBuild27
1 files changed, 24 insertions, 3 deletions
diff --git a/network/haproxy/haproxy.SlackBuild b/network/haproxy/haproxy.SlackBuild
index 100d9cd2a6..5346ce94f0 100644
--- a/network/haproxy/haproxy.SlackBuild
+++ b/network/haproxy/haproxy.SlackBuild
@@ -5,6 +5,9 @@
# Copyright 2018 T3slider <t3slider@gmail.com>
# All rights reserved.
#
+# Copyright 2022 Badchay <badchay@protonmail.com>
+# All rights reserved.
+#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@@ -25,7 +28,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=haproxy
-VERSION=${VERSION:-2.5.3}
+VERSION=${VERSION:-2.5.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -70,6 +73,10 @@ TARGET=${TARGET:-linux-glibc}
# Include lua support? (Requires lua53)
LUA=${LUA:-no}
+# Perl Compatible Regular Expressions version 2
+# is enabled by default. You can't compile both
+# PCRE and PCRE2 support.
+OLDPCRE=${OLDPCRE:-no}
set -e
@@ -87,16 +94,27 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
LUAOPT=""
-if [ "$LUA" != "no" ]; then
+if [ "$LUA" == "yes" ]; then
LUAOPT="USE_LUA=1"
+else
+ LUAOPT="USE_LUA="
fi
+PCREOPT=""
+if [ "$OLDPCRE" == "yes" ]; then
+ PCREOPT="USE_PCRE=1"
+else
+ PCREOPT="USE_PCRE2=1"
+fi
+
+
make \
TARGET=$TARGET \
- USE_PCRE=1 \
+ $PCREOPT \
USE_OPENSSL=1 \
USE_ZLIB=1 \
USE_NS=1 \
+ USE_SYSTEMD= \
$LUAOPT \
EXTRA=""
make install \
@@ -116,6 +134,9 @@ install -D -m 0644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
cp -a CHANGELOG CONTRIBUTING LICENSE MAINTAINERS README ROADMAP SUBVERS VERDATE VERSION examples \
$PKG/usr/doc/$PRGNAM-$VERSION
+
+cp $CWD/{syslog.example,logrotate.example} $PKG/usr/doc/$PRGNAM-$VERSION/examples/
+
mkdir -p $PKG/etc/haproxy
mv $PKG/usr/doc/$PRGNAM-$VERSION/examples/errorfiles $PKG/etc/haproxy/errors
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild