1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
### goals
1. Get git-annex working at the command line in Android,
along with all the programs it needs.
2. Get the webapp and assistant working. A hopefully small Java app will be
developed, which runs the webapp daemon, and a web browser to display it.
Current status: git-annex can be built for Android, with `make android`.
You need <https://github.com/neurocyte/ghc-android> installed first,
and also have to `cabal install` all necessary dependencies.
### TODO
* port busybox, so it doesn't need KBOX's busybox
* Make a runshell wrapper for Android, setting paths, etc.
* Build a standalone tarball for Android.
* Make build system that can generate ports, and tarball, from source
checkouts.
* git-annex sets `#!/bin/sh` in hook script, but that is not
a valid path on android, and the right path needs to be determined at runtime.
### Android specific features
The app should be aware of power status, and avoid expensive background
jobs when low on battery or run flat out when plugged in.
The app should be aware of network status, and avoid expensive data
transfers when not on wifi. This may need to be configurable.
### FAT
Due to use of the FAT filesystem, which doesn't do symlinks, [[desymlink]]
is probably needed for at least older Android devices that have SD cards.
### Porting notes
#### git
To build git, you can use the C cross compiler installed by ghc-android.
I did so like this:
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH NO_OPENSSL=1 NO_GETTEXT=1 NO_GECOS_IN_PWENT=1 NO_GETPASS=1 NO_NSEC=1 NO_MKDTEMP=1 NO_PTHREADS=1 NO_PERL=1 NO_CURL=1 NO_EXPAT=1 NO_TCLTK=1 NO_ICONV=1 make
This required first making cc a symlink to arm-linux-androideabi-gcc
#### rsync
Copy in config.sub and config.guess from recent autoconf, and build:
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH ./configure --host=arm-linux-androideabi --disable-locale --disable-iconv-open --disable-iconv --disable-acl-support --disable-xattr-support
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH make
Build failures can be worked around by removing uses of `S_IEXEC` and
getpass.
#### gnupg
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH ./configure --host=arm-linux-androideabi --disable-gnupg-iconv --enable-minimal --disable-card-support --disable-agent-support --disable-photo-viewers --disable-keyserver-helpers --disable-nls
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH make
Build fails in docs, but see `g10/gpg`
#### dropbear
Use git://github.com/android/platform_external_dropbear
Copy in config.sub and config.guess from recent autoconf, and build:
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH ./configure --host=arm-linux-androideabi --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/bin:$PATH make
TODO build fails
|