summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-22 22:23:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-22 22:23:08 -0400
commit91b8236c47e5a4368650ab88e519d04a752e1fd8 (patch)
treed1bb1bfbf422bf68948b42de0e857384c5f4b32c
parent7fbabbed47c2428547b303e96d68e30d6026f257 (diff)
working on getting make androidapp to work now
-rw-r--r--doc/install/Android.mdwn7
-rw-r--r--standalone/android/Makefile9
-rwxr-xr-xstandalone/android/buildchroot-inchroot1
-rwxr-xr-xstandalone/android/buildchroot-inchroot-asuser16
4 files changed, 21 insertions, 12 deletions
diff --git a/doc/install/Android.mdwn b/doc/install/Android.mdwn
index 0b7fa25c7..c39d11568 100644
--- a/doc/install/Android.mdwn
+++ b/doc/install/Android.mdwn
@@ -30,10 +30,3 @@ git-annex can be built from source for Android.
this happens.
3. Finally, once the chroot is set up, you can build an Android binary
with `make android`, and `make androidapp` will build the complete APK.
-
-* You will need to have the Android SDK and NDK installed; see
- `standalone/android/Makefile` to configure the paths to them. You'll also
- need ant, and the JDK.
-* You also need to install git and all the utilities listed on [[fromscratch]],
- on the system doing the building.
-* Then to build the full Android app bundle, use `make androidapp`
diff --git a/standalone/android/Makefile b/standalone/android/Makefile
index 39b8df054..04d8af1bd 100644
--- a/standalone/android/Makefile
+++ b/standalone/android/Makefile
@@ -2,22 +2,21 @@
# and builds the Android app.
# Add Android cross-compiler to PATH (as installed by ghc-android)
-# (This directory also needs to have a cc that is a symlink to the prefixed
-# gcc cross-compiler executable.)
ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.7/bin
PATH:=$(ANDROID_CROSS_COMPILER):$(PATH)
# Paths to the Android SDK and NDK.
-export ANDROID_SDK_ROOT?=$(HOME)/tmp/adt-bundle-linux-x86/sdk
-export ANDROID_NDK_ROOT?=$(HOME)/tmp/android-ndk-r8d
+export ANDROID_SDK_ROOT?=$(HOME)/adt-bundle-linux-x86/sdk
+export ANDROID_NDK_ROOT?=$(HOME)/android-ndk
# Where to store the source tree used to build utilities. This
# directory will be created by `make source`.
-GIT_ANNEX_ANDROID_SOURCETREE?=$(HOME)/tmp/android-sourcetree
+GIT_ANNEX_ANDROID_SOURCETREE?=$(HOME)/android-sourcetree
GITTREE=$(GIT_ANNEX_ANDROID_SOURCETREE)/git/installed-tree
build: start
+ if [ ! -e "$(GIT_ANNEX_ANDROID_SOURCETREE)" ]; then $(MAKE) source; fi
$(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl/build-stamp
$(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/build-stamp
$(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/build-stamp
diff --git a/standalone/android/buildchroot-inchroot b/standalone/android/buildchroot-inchroot
index 1ecc4ceb6..1833c04a2 100755
--- a/standalone/android/buildchroot-inchroot
+++ b/standalone/android/buildchroot-inchroot
@@ -14,6 +14,7 @@ apt-get -y install build-essential ghc git libncurses5-dev cabal-install
apt-get -y install llvm-3.0 # not 3.1; buggy on arm. 3.2 is ok too
apt-get -y install ca-certificates curl file m4 autoconf zlib1g-dev
apt-get -y install libgnutls-dev libxml2-dev libgsasl7-dev pkg-config c2hs
+apt-get -y install ant default-jdk rsync wget gnupg lsof unzip
apt-get clean
wget http://snapshot.debian.org/archive/debian/20130903T155330Z/pool/main/a/automake-1.14/automake_1.14-1_all.deb
dpkg -i automake*.deb
diff --git a/standalone/android/buildchroot-inchroot-asuser b/standalone/android/buildchroot-inchroot-asuser
index 662912246..37c0c24c6 100755
--- a/standalone/android/buildchroot-inchroot-asuser
+++ b/standalone/android/buildchroot-inchroot-asuser
@@ -12,3 +12,19 @@ git clone https://github.com/joeyh/ghc-android
cd ghc-android
git checkout stable-ghc-snapshot
./build
+
+# Set up android SDK where the git-annex android Makefile
+# expects to find it.
+cd ..
+ln -s ghc-android/android-ndk-* android-ndk
+wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130917.zip
+unzip adt*.zip
+rm adt*.zip
+mv adt-bundle-linux-x86-* adt-bundle-linux-x86
+rm -rf adt-bundle-linux-x86/eclipse
+
+# The git-annex android Makefile needs this cc symlink.
+ln -s arm-linux-androideabi-gcc \
+ $HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin/cc
+
+git clone git://git-annex.branchable.com/ git-annex