Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 59 lines (49 sloc) 1.764 kb
#!/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
if [[ ! -d /data ]]; then
WHOAMI=$(whoami)
echo "The /data directory required by this build script does not exist!"
echo "Please run the following command as root and re-run this script."
echo "# mkdir /data; chown $WHOAMI:$WHOAMI /data"
exit 1
fi
cd $COUCH_HOME
# Android Build Support from https://github.com/apage43/couchdb/tree/0.11.x-android
# Mozilla JS compatibility by chrisccoulson from jsapi@irc.mozilla.org
# Fixes for Android by matt.adams@radicaldynamic.com
./bootstrap
ERL_LIBS=$ERL_HOME/lib \
ERL=$ERL_HOME/bootstrap/bin/erl \
ERLC=$ERL_HOME/bootstrap/bin/erlc \
CXX=agcc \
CXXFLAGS="-fno-rtti -fno-exceptions -I$COUCH_ANDROID_HOME/build/deps/otp_rel/usr/include -I$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/" \
CFLAGS="-I$ERL_HOME/erts/emulator/beam/ -I$ERL_HOME/erts/include/arm-unknown-eabi/" \
CC=agcc \
./configure \
--with-ejson-compare=no \
--host=arm-eabi \
--prefix=/data/data/%app_name%/couchdb \
--with-erlang=$COUCH_ANDROID_HOME/build/deps/otp_rel/usr/include \
--with-js-include=$COUCH_ANDROID_HOME/build/deps/mozilla-current/mozilla-central/js/src/dist/include \
--with-js-lib="$COUCH_ANDROID_HOME/build/deps/mozilla-current/mozilla-central/js/src"
export ERL_LIBS=$ERL_HOME/lib
make -s
make install
# fix up the snappy nif
cd src/snappy
agcc -shared -o .libs/snappy_nif.so \
snappy_nif.o snappy.o snappy-sinksource.o snappy-stubs-internal.o \
-L../../../Android-Couchbase-SourceBuild/build/deps/otp_rel/erts-5.8.5/bin/ \
-lbeam \
-L$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi \
-lstlport_static \
-lgcc \
-lstdc++
make -s
make install
Jump to Line
Something went wrong with that request. Please try again.