8000 Adding sqlcipher and openssl submodules · dw3/android-database-sqlcipher@f238bde · GitHub
[go: up one dir, main page]

Skip to content

Commit f238bde

Browse files
Adding sqlcipher and openssl submodules
1 parent a3cf5c5 commit f238bde

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "external/sqlcipher"]
2+
path = external/sqlcipher
3+
url = https://github.com/sqlcipher/sqlcipher.git
4+
[submodule "external/openssl"]
5+
path = external/openssl
6+
url = https://github.com/openssl/openssl.git

build-openssl-libraries.sh

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#! /usr/bin/env sh
2+
(cd external/openssl;
3+
4+
if [ ! ${ANDROID_NDK_ROOT} ]; then
5+
echo "ANDROID_NDK_ROOT environment variable not set, set and rerun"
6+
exit 1
7+
fi
8+
9+
HOST_INFO=`uname -a`
10+
case ${HOST_INFO} in
11+
Darwin*)
12+
TOOLCHAIN_SYSTEM=darwin-x86
13+
;;
14+
Linux*)
15+
if [[ "${HOST_INFO}" == *i686* ]]
16+
then
17+
TOOLCHAIN_SYSTEM=linux-x86
18+
else
19+
TOOLCHAIN_SYSTEM=linux-x86_64
20+
fi
21+
;;
22+
*)
23+
echo "Toolchain unknown for host system"
24+
exit 1
25+
;;
26+
esac
27+
28+
rm ../android-libs/armeabi/libcrypto.a \
29+
../android-libs/x86/libcrypto.a
30+
31+
git clean -dfx && git checkout -f
32+
./Configure dist
33+
34+
ANDROID_PLATFORM_VERSION=android-19
35+
ANDROID_TOOLCHAIN_DIR=/tmp/sqlcipher-android-toolchain
36+
OPENSSL_CONFIGURE_OPTIONS="-no-krb5 no-idea no-camellia
37+
no-seed no-bf no-cast no-rc2 no-rc4 no-rc5 no-md2
38+
no-md4 no-ripemd no-rsa no-ecdh no-sock no-ssl2 no-ssl3
39+
no-dsa no-dh no-ec no-ecdsa no-tls1 no-pbe no-pkcs
40+
no-tlsext no-pem no-rfc3779 no-whirlpool no-ui no-srp
41+
no-ssltrace no-tlsext no-mdc2 no-ecdh no-engine
42+
no-tls2 no-srtp -fPIC"
43+
44+
# arm build
45+
${ANDROID_NDK_ROOT}/build/tools/make-standalone-toolchain.sh \
46+
--platform=${ANDROID_PLATFORM_VERSION} \
47+
--install-dir=${ANDROID_TOOLCHAIN_DIR} \
48+
--system=${TOOLCHAIN_SYSTEM} \
49+
--arch=arm
50+
51+
export PATH=${ANDROID_TOOLCHAIN_DIR}/bin:$PATH
52+
53+
RANLIB=arm-linux-androideabi-ranlib \
54+
AR=arm-linux-androideabi-ar \
55+
CC=arm-linux-androideabi-gcc \
56+
./Configure android ${OPENSSL_CONFIGURE_OPTIONS}
57+
58+
make clean
59+
make build_crypto
60+
mv libcrypto.a ../android-libs/armeabi/
61+
62+
rm -rf ${ANDROID_TOOLCHAIN_DIR}
63+
64+
#armv7 build
65+
${ANDROID_NDK_ROOT}/build/tools/make-standalone-toolchain.sh \
66+
--platform=${ANDROID_PLATFORM_VERSION} \
67+
--install-dir=${ANDROID_TOOLCHAIN_DIR} \
68+
--system=${TOOLCHAIN_SYSTEM} \
69+
--arch=arm
70+
71+
export PATH=${ANDROID_TOOLCHAIN_DIR}/bin:$PATH
72+
73+
RANLIB=arm-linux-androideabi-ranlib \
74+
AR=arm-linux-androideabi-ar \
75+
CC=arm-linux-androideabi-gcc \
76+
./Configure android-armv7 ${OPENSSL_CONFIGURE_OPTIONS}
77+
78+
make clean
79+
make build_crypto
80+
mv libcrypto.a ../android-libs/armeabi-v7a/
81+
82+
rm -rf ${ANDROID_TOOLCHAIN_DIR}
83+
84+
# x86 build
85+
${ANDROID_NDK_ROOT}/build/tools/make-standalone-toolchain.sh \
86+
--platform=${ANDROID_PLATFORM_VERSION} \
87+
--install-dir=${ANDROID_TOOLCHAIN_DIR} \
88+
--system=${TOOLCHAIN_SYSTEM} \
89+
--arch=x86
90+
91+
export PATH=${ANDROID_TOOLCHAIN_DIR}/bin:$PATH
92+
93+
RANLIB=i686-linux-android-ranlib \
94+
AR=i686-linux-android-ar \
95+
CC=i686-linux-android-gcc \
96+
./Configure android-x86 ${OPENSSL_CONFIGURE_OPTIONS}
97+
98+
make clean
99+
make build_crypto
100+
mv libcrypto.a ../android-libs/x86/
101+
)

external/openssl

Submodule openssl added at 902f3f5

external/sqlcipher

Submodule sqlcipher added at 910fd70

0 commit comments

Comments
 (0)
0