mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Squashed 'OpenVPN Adapter/Vendors/openvpn/' content from commit da99df6
git-subtree-dir: OpenVPN Adapter/Vendors/openvpn git-subtree-split: da99df69492256d7a18bbea303ae98457782a4bf
This commit is contained in:
20
scripts/linux/build-all
Executable file
20
scripts/linux/build-all
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
export DEP_DIR=${DEP_DIR:-$HOME/linux}
|
||||
cd $DEP_DIR
|
||||
rm -rf asio* boost* lz4* lzo* minicrypto openssl* polarssl* snappy*
|
||||
echo "******* ASIO"
|
||||
$O3/core/deps/asio/build-asio
|
||||
echo "******* MBEDTLS"
|
||||
$O3/core/scripts/linux/build-mbedtls
|
||||
echo "******* LZ4"
|
||||
$O3/core/scripts/linux/build-lz4
|
||||
|
||||
#$O3/core/scripts/linux/build-openssl x64
|
||||
#$O3/core/scripts/linux/build-lzo
|
||||
#$O3/core/scripts/linux/build-boost
|
||||
#$O3/core/scripts/linux/build-snappy
|
||||
#$O3/core/scripts/linux/consolidate-so
|
||||
18
scripts/linux/build-boost
Executable file
18
scripts/linux/build-boost
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
|
||||
rm -rf boost
|
||||
mkdir boost
|
||||
|
||||
export TARGETS="linux"
|
||||
|
||||
$O3/core/deps/boost/build-boost
|
||||
exit 0
|
||||
14
scripts/linux/build-lz4
Executable file
14
scripts/linux/build-lz4
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
rm -rf lz4
|
||||
mkdir lz4
|
||||
TARGET=linux $O3/core/deps/lz4/build-lz4
|
||||
exit 0
|
||||
14
scripts/linux/build-lzo
Executable file
14
scripts/linux/build-lzo
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
rm -rf lzo
|
||||
mkdir lzo
|
||||
TARGET=linux $O3/core/deps/lzo/build-lzo
|
||||
exit 0
|
||||
19
scripts/linux/build-mbedtls
Executable file
19
scripts/linux/build-mbedtls
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
rm -rf mbedtls
|
||||
|
||||
if [ "$LINK_MODE" = "shared" ]; then
|
||||
SHARED=1
|
||||
else
|
||||
SHARED=0
|
||||
fi
|
||||
VERBOSE=1 TARGET=linux ENABLE_SERVER=1 SHARED=$SHARED $O3/core/deps/mbedtls/build-mbedtls
|
||||
exit 0
|
||||
35
scripts/linux/build-openssl
Executable file
35
scripts/linux/build-openssl
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: build-openssl x64|arm"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
|
||||
rm -rf openssl
|
||||
mkdir openssl
|
||||
|
||||
export LINK_MODE=shared
|
||||
|
||||
case $1 in
|
||||
x64*)
|
||||
export OPENSSL_TARGET=linux-x86_64
|
||||
;;
|
||||
arm*)
|
||||
export OPENSSL_TARGET=linux-armv4
|
||||
;;
|
||||
*)
|
||||
echo "unknown platform"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
TARGET=linux $O3/core/deps/openssl/build-openssl
|
||||
exit 0
|
||||
20
scripts/linux/build-polarssl
Executable file
20
scripts/linux/build-polarssl
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
rm -rf polarssl
|
||||
mkdir polarssl
|
||||
if [ "$LINK_MODE" = "shared" ]; then
|
||||
SHARED=1
|
||||
else
|
||||
SHARED=0
|
||||
fi
|
||||
VERBOSE=1 TARGET=linux ENABLE_SERVER=1 SHARED=$SHARED $O3/core/deps/polarssl/build-polarssl
|
||||
mv polarssl-linux polarssl
|
||||
exit 0
|
||||
15
scripts/linux/build-polarssl-ovpn2
Executable file
15
scripts/linux/build-polarssl-ovpn2
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# When running OpenVPN 2.x ./configure script, use the following command:
|
||||
#
|
||||
# POLARSSL_CFLAGS="-I$HOME/linux/polarssl/polarssl-linux/include" POLARSSL_LIBS="-L$HOME/linux/polarssl/polarssl-linux/library -lpolarssl" ./configure --with-crypto-library=polarssl
|
||||
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
|
||||
rm -rf polarssl
|
||||
mkdir polarssl
|
||||
VERBOSE=1 TARGET=linux ENABLE_SERVER=1 ENABLE_FS_IO=1 $O3/core/deps/polarssl/build-polarssl
|
||||
mv polarssl-linux polarssl
|
||||
exit 0
|
||||
13
scripts/linux/build-snappy
Executable file
13
scripts/linux/build-snappy
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$O3" ]; then
|
||||
echo O3 var must point to ovpn3 tree ; exit 1
|
||||
fi
|
||||
if [ -z "$DEP_DIR" ]; then
|
||||
echo DEP_DIR var must point to ovpn3 dependency tree
|
||||
exit 1
|
||||
fi
|
||||
cd $DEP_DIR
|
||||
rm -rf snappy
|
||||
mkdir snappy
|
||||
TARGET=linux $O3/core/deps/snappy/build-snappy
|
||||
10
scripts/linux/consolidate-so
Executable file
10
scripts/linux/consolidate-so
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
rm -rf so
|
||||
mkdir so
|
||||
OPT=-d
|
||||
[ -d boost ] && cp $OPT boost/stage-linux/lib/lib* so/
|
||||
[ -d lzo ] && cp $OPT lzo/lzo-linux/lib/lib* so/
|
||||
[ -d openssl ] && cp $OPT openssl/openssl-linux/lib/lib* so/
|
||||
[ -d snappy ] && cp $OPT snappy/snappy-linux/lib/lib* so/
|
||||
[ -d polarssl ] && cp $OPT polarssl/polarssl-linux/library/lib* so/
|
||||
exit 0
|
||||
Reference in New Issue
Block a user