diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-12 14:24:53 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-12 14:24:53 -0400 |
commit | 6b1536a9af254d4f010fcc8acf11262154b90bdd (patch) | |
tree | 4fec56faf10a12c9f716838a2c923d3c86cd5aa9 /standalone | |
parent | ef4d1f04322d9af0239222e13cd782d01c1e6d05 (diff) |
separate android 4.0 and 4.3 builds needed
Also, parameterize the abdroid abi version
Diffstat (limited to 'standalone')
-rw-r--r-- | standalone/android/Makefile | 13 | ||||
-rw-r--r-- | standalone/android/abiversion | 1 | ||||
-rwxr-xr-x | standalone/android/buildchroot | 1 | ||||
-rwxr-xr-x | standalone/android/buildchroot-inchroot-asuser | 3 | ||||
-rwxr-xr-x | standalone/android/clean-haskell-packages | 4 | ||||
-rwxr-xr-x | standalone/android/install-haskell-packages | 2 |
6 files changed, 15 insertions, 9 deletions
diff --git a/standalone/android/Makefile b/standalone/android/Makefile index 2b326abc7..d80d568db 100644 --- a/standalone/android/Makefile +++ b/standalone/android/Makefile @@ -2,7 +2,7 @@ # and builds the Android app. # Add Android cross-compiler to PATH (as installed by ghc-android) -ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/android-14/arm-linux-androideabi-4.8/bin +ANDROID_CROSS_COMPILER?=$(HOME)/.ghc/$(shell cat abiversion)/bin PATH:=$(ANDROID_CROSS_COMPILER):$(PATH) # Paths to the Android SDK and NDK. @@ -31,7 +31,6 @@ build: start # Install executables as pseudo-libraries so they will be # unpacked from the .apk. mkdir -p $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi - cp ../../tmp/androidtree/dist/build/git-annex/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so cp $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/busybox $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.busybox.so cp $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/ssh $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.ssh.so cp $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/ssh-keygen $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.ssh-keygen.so @@ -74,9 +73,15 @@ build: start git rev-parse HEAD > $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.version.so + mkdir -p ../../tmp/4.0 ../../tmp/4.3 + + cp ../../tmp/androidtree/dist/build/git-annex/4.3/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so + cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && ant debug + cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/4.3/git-annex.apk + + cp ../../tmp/androidtree/dist/build/git-annex/4.0/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && ant debug - mkdir -p ../../tmp - cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/git-annex.apk + cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/4.0/git-annex.apk $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl/build-stamp: cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && CC=$$(which cc) ./Configure android diff --git a/standalone/android/abiversion b/standalone/android/abiversion new file mode 100644 index 000000000..4cc4c14cd --- /dev/null +++ b/standalone/android/abiversion @@ -0,0 +1 @@ +android-14/arm-linux-androideabi-4.8 diff --git a/standalone/android/buildchroot b/standalone/android/buildchroot index b759ae6ce..44337eb0c 100755 --- a/standalone/android/buildchroot +++ b/standalone/android/buildchroot @@ -8,6 +8,7 @@ fi debootstrap --arch=i386 stable debian-stable-android cp $0-inchroot debian-stable-android/tmp cp $0-inchroot-asuser debian-stable-android/tmp +cp $(dirname $0)/abiversion debian-stable-android/tmp # Don't use these vars in the chroot. unset TMP diff --git a/standalone/android/buildchroot-inchroot-asuser b/standalone/android/buildchroot-inchroot-asuser index c3d7bdf76..710e76e46 100755 --- a/standalone/android/buildchroot-inchroot-asuser +++ b/standalone/android/buildchroot-inchroot-asuser @@ -29,8 +29,7 @@ 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.8/bin/cc +ln -s arm-linux-androideabi-gcc $HOME/.ghc/$(cat /tmp/abiversion)/bin/cc cd git clone git://git-annex.branchable.com/ git-annex diff --git a/standalone/android/clean-haskell-packages b/standalone/android/clean-haskell-packages index 49a2ad713..b8c6132d6 100755 --- a/standalone/android/clean-haskell-packages +++ b/standalone/android/clean-haskell-packages @@ -2,5 +2,5 @@ # Removes all currently installed cross-compiled haskell packages # except those part of ghc. # Useful if the build failed. -rm -f $(grep -l $HOME/.ghc/android-14/arm-linux-androideabi-4.8/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/lib/*-ghc-*/package.conf.d/*.conf) -$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ghc-pkg recache +rm -f $(grep -l $HOME/.ghc/$(cat abiversion)/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/lib/*-ghc-*/package.conf.d/*.conf) +$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin/ghc-pkg recache diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 10272919d..f0a4b9113 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -115,6 +115,6 @@ echo echo echo cross build echo -PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.8/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin:$PATH +PATH=$HOME/.ghc/$(cat abiversion)/bin:$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin:$PATH cabal update install_pkgs |