summaryrefslogtreecommitdiff
path: root/install-win32/makeopenvpn
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
commit349cfa7acb95abe865209a28e417ec74b56f9bba (patch)
treead65334821b587c4ecdd461be84c94305ffdb888 /install-win32/makeopenvpn
Imported Upstream version 2.2.1upstream/2.2.1
Diffstat (limited to 'install-win32/makeopenvpn')
-rw-r--r--install-win32/makeopenvpn37
1 files changed, 37 insertions, 0 deletions
diff --git a/install-win32/makeopenvpn b/install-win32/makeopenvpn
new file mode 100644
index 0000000..c1a805d
--- /dev/null
+++ b/install-win32/makeopenvpn
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+H=`pwd`
+
+# get version.nsi definitions
+. autodefs/defs.sh
+
+if gcc --version &>/dev/null && [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [ -d "$PKCS11_HELPER_DIR" ]; then
+ # build OpenVPN binary
+
+ if ! [ -f Makefile ]; then
+ autoreconf -i -v \
+ && ./configure \
+ --enable-strict \
+ --prefix=$H/windest \
+ MAN2HTML=true \
+ --with-ssl-headers=$H/$OPENSSL_DIR/include \
+ --with-ssl-lib=$H/$OPENSSL_DIR/out \
+ --with-lzo-headers=$H/$LZO_DIR/include \
+ --with-lzo-lib=$H/$LZO_DIR \
+ --with-pkcs11-helper-headers=$H/$PKCS11_HELPER_DIR/usr/local/include \
+ --with-pkcs11-helper-lib=$H/$PKCS11_HELPER_DIR/usr/local/lib
+ fi
+
+ make -j $MAKE_JOBS && make install
+
+ # copy OpenVPN and service executables to GENOUT/bin
+ mkdir -p $GENOUT/bin &>/dev/null
+ cp windest/sbin/openvpn.exe $GENOUT/bin
+ cp windest/sbin/openvpnserv.exe $GENOUT/bin
+ if [ -z "$NO_STRIP" ]; then
+ strip $GENOUT/bin/openvpn.exe
+ strip $GENOUT/bin/openvpnserv.exe
+ fi
+else
+ echo DID NOT BUILD openvpn.exe and openvpnserv.exe because one or more of gcc, OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing
+fi