separate android 4.0 and 4.3 builds needed
Also, parameterize the abdroid abi version
This commit is contained in:
parent
750a3ca22f
commit
16fa980689
11 changed files with 37 additions and 20 deletions
14
Makefile
14
Makefile
|
@ -189,14 +189,16 @@ android: Build/EvilSplicer
|
|||
sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports /i' tmp/androidtree/git-annex.cabal
|
||||
# Cabal cannot cross compile with custom build type, so workaround.
|
||||
sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal
|
||||
# Build just once, but link twice, for 2 different versions of Android.
|
||||
mkdir -p tmp/androidtree/dist/build/git-annex/4.0 tmp/androidtree/dist/build/git-annex/4.3
|
||||
if [ ! -e tmp/androidtree/dist/setup/setup ]; then \
|
||||
cd tmp/androidtree && $$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \
|
||||
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \
|
||||
fi
|
||||
cd tmp/androidtree && $$HOME/.ghc/android-14/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/cabal build
|
||||
|
||||
adb:
|
||||
ANDROID_FLAGS="-Production" $(MAKE) android
|
||||
adb push tmp/androidtree/dist/build/git-annex/git-annex /data/data/ga.androidterm/bin/git-annex
|
||||
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
|
||||
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.0/git-annex
|
||||
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
|
||||
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc \
|
||||
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.3/git-annex
|
||||
|
||||
androidapp:
|
||||
$(MAKE) android
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -24,6 +24,8 @@ git-annex (5.20131102) UNRELEASED; urgency=low
|
|||
remote monitoring interfaceat http://localhost:4242/
|
||||
* Fix bug that caused bad information to be written to the git-annex branch
|
||||
when running describe or other commands with a remote that has no uuid.
|
||||
* Work around Android linker problem that had prevented git-annex from
|
||||
running on Android 4.3 and 4.4.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 06 Nov 2013 16:14:14 -0400
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
As per [[install/Android/#comment-e218073735d67691a2c3f66cc53ca6ac]] and [[install/Android/#comment-29bd13ab9cb830ffcd7850b84fb111c8]] :
|
||||
|
||||
git-annex is broken on Android 4.3; both on Nexus 4 and Nexus 7.
|
||||
|
||||
> [[Fixed|done]]. A 4.3 build of the apk is now available.
|
||||
> (Unfortunately the fix breaks support for older versions of Android,
|
||||
> so two versions of the apk have to be built now.) --[[Joey]]
|
||||
|
|
|
@ -7,15 +7,20 @@ Now git-annex can be used on Android!
|
|||
First, ensure your Android device is configured to allow installation
|
||||
of the app. Go to Setup -> Security, and enable "Unknown Sources".
|
||||
|
||||
[Download the git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/)
|
||||
onto your Android device, and open it to install.
|
||||
Then download the git-annex.apk for your version of Android, and
|
||||
open it to install.
|
||||
|
||||
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.3/git-annex.apk)
|
||||
* [Android 4.0 to 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/android/current/4.0/git-annex.apk)
|
||||
|
||||
## autobuilds
|
||||
|
||||
A daily build is also available, thanks to Mesar Hameed and the University
|
||||
of Bath CS department.
|
||||
|
||||
* [download apk](http://downloads.kitenet.net/git-annex/autobuild/android/git-annex.apk) ([build logs](http://downloads.kitenet.net/git-annex/autobuild/android/))
|
||||
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.3/git-annex.apk)
|
||||
* [Android 4.0 and 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.0/git-annex.apk)
|
||||
* [build logs](http://downloads.kitenet.net/git-annex/autobuild/android/)
|
||||
|
||||
## building it yourself
|
||||
|
||||
|
|
|
@ -131,8 +131,6 @@ Executable git-annex
|
|||
if flag(Android)
|
||||
Build-Depends: data-endian
|
||||
CPP-Options: -D__ANDROID__
|
||||
-- Avoid R_ARM_COPY problem which breaks Android linker
|
||||
GHC-Options: -optl-z -optlnocopyreloc
|
||||
|
||||
if flag(Assistant)
|
||||
if os(linux) && flag(Inotify)
|
||||
|
|
|
@ -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
|
||||
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.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
|
||||
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
|
||||
|
|
1
standalone/android/abiversion
Normal file
1
standalone/android/abiversion
Normal file
|
@ -0,0 +1 @@
|
|||
android-14/arm-linux-androideabi-4.8
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue