Permalink
Browse files

Allow configurable data + installation directories

Change-Id: Idc15d4bf2f3ef47b5f048f1910764ee68ea23749
Reviewed-on: http://review.couchbase.org/9399
Reviewed-by: Dale Harvey <daleharvey@arandomurl.com>
Tested-by: Dale Harvey <daleharvey@arandomurl.com>
  • Loading branch information...
1 parent 15dfab8 commit e3fc2c52136b48dca886a5bac295af982227d340 @daleharvey daleharvey committed with Dale Harvey Sep 6, 2011
Showing with 11 additions and 9 deletions.
  1. +11 −9 build.final
View
20 build.final
@@ -91,22 +91,23 @@ patch -lp0 < patches/release.patch
rm release
ANDROID_DEFAULT='[couchdb]
-database_dir = /sdcard/Android/data/%app_name%/db
-view_index_dir = /sdcard/Android/data/%app_name%/db
-util_driver_dir = /data/data/%app_name%/couchdb/lib/couchdb/android_icu/%sdk_int%
-uri_file = /sdcard/Android/data/%app_name%/db/couch.uri
+database_dir = %couch_data_dir%/db
+view_index_dir = %couch_data_dir%/db
+util_driver_dir = %couch_installation_dir%/couchdb/lib/couchdb/android_icu/%sdk_int%
+uri_file = %couch_data_dir%/db/couch.uri
file_compression = none
[httpd]
port = 0
bind_address = 0.0.0.0
[log]
-file = /sdcard/Android/data/%app_name%/db/couch.log
+file = %couch_data_dir%/db/couch.log
level = debug
[query_servers]
-javascript = /data/data/%app_name%/couchdb/bin/couchjs_wrapper /data/data/%app_name%/couchdb/share/couchdb/server/main.js
+javascript = %couch_installation_dir%/couchdb/bin/couchjs_wrapper %couch_installation_dir%/couchdb/share/couchdb/server/main.js
+coffeescript = %couch_installation_dir%/couchdb/bin/couchjs %couch_installation_dir%/couchdb/share/couchdb/server/main-coffee.js
[daemons]
spatial_manager={couch_spatial, start_link, []}
@@ -127,7 +128,7 @@ touch $REL_PATH/couchdb/etc/couchdb/overrides.ini
COUCHDB_WRAPPER='#!/system/bin/sh -e
-export HOME=/data/data/%app_name%
+export HOME=%couch_installation_dir%
COUCHDB_DIR=$HOME/couchdb
COUCHDB_BINDIR=$COUCHDB_DIR/bin
@@ -148,8 +149,8 @@ exec $BINDIR/erlexec $@'
echo "$COUCHDB_WRAPPER" >> $REL_PATH/couchdb/bin/couchdb_wrapper
COUCHJS_WRAPPER='#!/system/bin/sh
-export LD_LIBRARY_PATH=/data/data/%app_name%/couchdb/bin
-exec /data/data/%app_name%/couchdb/lib/couchdb/bin/couchjs $@'
+export LD_LIBRARY_PATH=%couch_installation_dir%/couchdb/bin
+exec %couch_installation_dir%/couchdb/lib/couchdb/bin/couchjs $@'
echo "$COUCHJS_WRAPPER" >> $REL_PATH/couchdb/bin/couchjs_wrapper
@@ -182,6 +183,7 @@ rm -rf etc/couchdb/default.d
rm -rf lib/couchdb/erlang/lib/etap/
rm bin/couchjs
rm bin/couchdb
+rm lib/couchdb/erlang/lib/couch/priv/lib/couch_icu_driver.la
# Location to ICU will be determined dynamically when Couch is initialized by the Couch-dependant app.
# See libcouch-android and android_icu/ for more information.
rm lib/couchdb/couch_icu_driver.so

0 comments on commit e3fc2c5

Please sign in to comment.