forked from couchbaselabs/Android-Couchbase-SourceBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.nspr
executable file
·36 lines (24 loc) · 773 Bytes
/
build.nspr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash -x
#
source scripts/env
# Make sure we have a valid environment before we continue
./scripts/checkenv
if [[ $? -ne 0 ]]; then
exit 1
fi
cd $COUCH_ANDROID_HOME/build/deps/ndk
NDK=android-ndk-r4c-0moz3
[[ -f $NDK.tar.bz2 ]] || wget http://ftp.mozilla.org/pub/mozilla.org/mobile/source/$NDK.tar.bz2
tar -jxf $NDK.tar.bz2
ANDROID_NDK=$COUCH_ANDROID_HOME/build/deps/ndk/android-ndk-r4c
cd $COUCH_ANDROID_HOME/build/deps/mozilla-current/mozilla-central/nsprpub
./configure \
--target=arm-android-eabi \
--with-android-ndk=$ANDROID_NDK \
--with-android-platform=$ANDROID_NDK/build/platforms/android-8/arch-arm \
--enable-strip
make -s
MAKESTATUS=$?
# Remove shared libraries so that Couch is built with the static ones
rm dist/lib/*so
exit $MAKESTATUS