summaryrefslogtreecommitdiff
path: root/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild')
-rw-r--r--network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild27
1 files changed, 24 insertions, 3 deletions
diff --git a/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild b/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
index 6fc156beac..0aa8ce7daf 100644
--- a/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
+++ b/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for NetworkManager
+# Slackware build script for NetworkManager-openvpn
-# Copyright 2010-2013 Robby Workman, Northport, Alabama, USA
+# Copyright 2010-2015 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=NetworkManager-openvpn
-VERSION=${VERSION:-0.9.8.4}
+VERSION=${VERSION:-1.0.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,6 +54,19 @@ else
LIBDIRSUFFIX=""
fi
+# Bail out if user or group isn't valid on your system
+# For slackbuilds.org, assigned nm-openvpn uid/gid are 320/320
+# See http://slackbuilds.org/uid_gid.txt
+if ! getent group nm-openvpn 2>&1 > /dev/null; then
+ echo " You must have a \"nm-openvpn\" group to run this script."
+ echo " # groupadd -g 320 nm-openvpn"
+ exit 1
+elif ! getent passwd nm-openvpn 2>&1 > /dev/null; then
+ echo " You must have a \"nm-openvpn\" user to run this script."
+ echo " # useradd -u 320 -g nm-openvpn -d /var/lib/openvpn/chroot -s /bin/false nm-openvpn"
+ exit 1
+fi
+
set -e
rm -rf $PKG
@@ -83,6 +96,14 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+# Create the chroot directory
+# From src/nm-openvpn-service-defines.h
+# /* User name and group to run nm-openvpn-service under */
+# #define NM_OPENVPN_USER "nm-openvpn"
+# #define NM_OPENVPN_GROUP "nm-openvpn"
+# #define NM_OPENVPN_CHROOT LOCALSTATEDIR "/lib/openvpn/chroot"
+mkdir -p $PKG/var/lib/openvpn/chroot
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true