summaryrefslogtreecommitdiff
path: root/app/misc/build-native.sh
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-04 19:20:15 +0200
committerParménides GV <parmegv@sdf.org>2015-06-04 19:20:15 +0200
commit27594eeae6f40a402bc3110f06d57975168e74e3 (patch)
treecdabf6571e6f4ff07205fd6921d8095539a1fcdc /app/misc/build-native.sh
parent8dc4f58d96892fbfd83094fb85b1d17656035290 (diff)
ics-openvpn as a submodule! beautiful
ics-openvpn is now officially on GitHub, and they track openssl and openvpn as submodules, so it's easier to update everything. Just a git submodule update --recursive. I've also set up soft links to native modules from ics-openvpn in app, so that we don't copy files in Gradle (which was causing problems with the submodules .git* files, not being copied). That makes the repo cleaner.
Diffstat (limited to 'app/misc/build-native.sh')
-rwxr-xr-xapp/misc/build-native.sh54
1 files changed, 0 insertions, 54 deletions
diff --git a/app/misc/build-native.sh b/app/misc/build-native.sh
deleted file mode 100755
index 7382efc9..00000000
--- a/app/misc/build-native.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# Exit on errors
-set -e
-
-# Generate git config if the openvpn directory is checked out from git
-if [ -d openvpn/.git ]; then
- GIT=git
- cd openvpn
- CONFIGURE_GIT_CHFILES=$($GIT diff-files --name-status -r --ignore-submodules --quiet -- || echo "+")
- CONFIGURE_GIT_UNCOMMITTED=$($GIT diff-index --cached --quiet --ignore-submodules HEAD || echo "*")
- CONFIGURE_GIT_REVISION=$($GIT rev-parse --symbolic-full-name HEAD | cut -d/ -f3)-$($GIT rev-parse --short=16 HEAD)
- echo "#define CONFIGURE_GIT_REVISION \"${CONFIGURE_GIT_REVISION}\"" > config-version.h.tmp; \
- echo "#define CONFIGURE_GIT_FLAGS \"${CONFIGURE_GIT_CHFILES}${CONFIGURE_GIT_UNCOMMITTED}\"" >> config-version.h.tmp
-
- if ! [ -f config-version.h ] || ! cmp -s config-version.h.tmp config-version.h; then \
- echo "replacing config-version.h"
- mv config-version.h.tmp config-version.h
- else
- rm -f config-version.h.tmp
- fi
- cd ..
-fi
-
-if [ "x$1" = "x" ]; then
- ndk-build -j 8 USE_BREAKPAD=0
-else
- ndk-build $@
-fi
-
-if [ $? = 0 ]; then
- rm -rf ovpnlibs/
-
- cd libs
- mkdir -p ../ovpnlibs/assets
- for i in *
- do
- cp -v $i/nopievpn ../ovpnlibs/assets/nopievpn.$i
- cp -v $i/pievpn ../ovpnlibs/assets/pievpn.$i
- done
- # Removed compiled openssl libs, will use platform so libs
- # Reduces size of apk
- #
- rm -v */libcrypto.so */libssl.so
-
- for arch in *
- do
- builddir=../ovpnlibs/jniLibs/$arch
- mkdir -p $builddir
- cp -v $arch/*.so $builddir
- done
-else
- exit $?
-fi