summaryrefslogtreecommitdiffstats
path: root/network/strongswan/strongswan.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/strongswan/strongswan.SlackBuild')
-rw-r--r--network/strongswan/strongswan.SlackBuild60
1 files changed, 50 insertions, 10 deletions
diff --git a/network/strongswan/strongswan.SlackBuild b/network/strongswan/strongswan.SlackBuild
index 2b9fae21ae..648f426e0f 100644
--- a/network/strongswan/strongswan.SlackBuild
+++ b/network/strongswan/strongswan.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2018, Wayne Cuddy, wcuddyATgmailDOTcom
+# Copyright 2018-2019, Wayne Cuddy, wcuddyATgmailDOTcom
# Copyright 2009-2013, Jonathan Larsen (agentc0re), SLC, UT
# Copyright 2013-2015, Markus Hutmacher, mailing@markhu.de
# All rights reserved.
@@ -22,11 +22,40 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# 2019-03-02:
+# - upgraded upstream version to 5.7.2
+# - added DEFAULT_CONFIG_OPTS and EXTRA_CONFIG_OPTS
+#
+
PRGNAM=strongswan
-VERSION=${VERSION:-5.6.2}
+VERSION=${VERSION:-5.7.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+DEFAULT_CONFIG_OPTS="\
+ --enable-shared \
+ --enable-silent-rules \
+ --enable-openssl \
+ --enable-unity \
+ --enable-curl \
+ --enable-sql \
+ --enable-sqlite \
+ --enable-cmd \
+ --enable-af-alg \
+ --enable-gcrypt \
+ --enable-aesni \
+ --enable-sha3 \
+ --enable-files \
+ --enable-lookip \
+ --enable-eap-mschapv2 \
+ --enable-eap-tls \
+ --enable-eap-ttls \
+ --enable-eap-radius \
+ --enable-ext-auth \
+ --enable-xauth-eap \
+"
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -78,10 +107,9 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-shared \
- --disable-static \
- --enable-openssl \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux \
+ ${CONFIG_OPTS:-$DEFAULT_CONFIG_OPTS} \
+ $EXTRA_CONFIG_OPTS
make
make install DESTDIR=$PKG
@@ -92,18 +120,30 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
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
-# Don't clobber existing config files
-mv $PKG/etc/ipsec.secrets $PKG/etc/ipsec.secrets.new
-for i in $(find $PKG/etc -type f -name '*.conf') ; do mv $i $i.new ; done
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
cp -a COPYING ChangeLog INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
+
+# Don't clobber existing config files. The options passed to the
+# configure script determine which plugins are built. The plugin list
+# determines which configuration files are installed. It's not possible
+# to know this ahead of time since the user can modify the plugins to
+# this SlackBuild. This loop tracks configuration files produced during
+# the build. The doinst.sh script will use this information during
+# package installation to ensure modified configuration files are not
+# overwritten.
+for i in $(find etc -type f)
+do
+ mv $i $i.new
+ echo $i
+done 1>>$PKG/install/conffiles
+
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}