working on getting make androidapp to work now

This commit is contained in:
Joey Hess 2013-09-22 22:23:08 -04:00
parent 5ac0fcd12f
commit 51cc760e06
4 changed files with 21 additions and 12 deletions

View file

@ -30,10 +30,3 @@ git-annex can be built from source for Android.
this happens. this happens.
3. Finally, once the chroot is set up, you can build an Android binary 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. 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`

View file

@ -2,22 +2,21 @@
# and builds the Android app. # and builds the Android app.
# Add Android cross-compiler to PATH (as installed by ghc-android) # 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 ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.7/bin
PATH:=$(ANDROID_CROSS_COMPILER):$(PATH) PATH:=$(ANDROID_CROSS_COMPILER):$(PATH)
# Paths to the Android SDK and NDK. # Paths to the Android SDK and NDK.
export ANDROID_SDK_ROOT?=$(HOME)/tmp/adt-bundle-linux-x86/sdk export ANDROID_SDK_ROOT?=$(HOME)/adt-bundle-linux-x86/sdk
export ANDROID_NDK_ROOT?=$(HOME)/tmp/android-ndk-r8d export ANDROID_NDK_ROOT?=$(HOME)/android-ndk
# Where to store the source tree used to build utilities. This # Where to store the source tree used to build utilities. This
# directory will be created by `make source`. # 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 GITTREE=$(GIT_ANNEX_ANDROID_SOURCETREE)/git/installed-tree
build: start 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)/openssl/build-stamp
$(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/build-stamp $(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/build-stamp
$(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/build-stamp $(MAKE) $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/build-stamp

View file

@ -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 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 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 libgnutls-dev libxml2-dev libgsasl7-dev pkg-config c2hs
apt-get -y install ant default-jdk rsync wget gnupg lsof unzip
apt-get clean apt-get clean
wget http://snapshot.debian.org/archive/debian/20130903T155330Z/pool/main/a/automake-1.14/automake_1.14-1_all.deb wget http://snapshot.debian.org/archive/debian/20130903T155330Z/pool/main/a/automake-1.14/automake_1.14-1_all.deb
dpkg -i automake*.deb dpkg -i automake*.deb

View file

@ -12,3 +12,19 @@ git clone https://github.com/joeyh/ghc-android
cd ghc-android cd ghc-android
git checkout stable-ghc-snapshot git checkout stable-ghc-snapshot
./build ./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