git-annex/standalone/android/buildchroot-inchroot-asuser

45 lines
1.2 KiB
Text
Raw Normal View History

#!/bin/sh
# Runs inside the chroot set up by buildchroot, as the user it creates
set -e
2014-05-24 18:44:20 +00:00
set -x
# Put in /tmp by buildchroot, but when bootstrapping with propellor,
# this is run inside a checked out git-annex tree.
if [ -e /tmp/abiversion ]; then
ABIVERSION=$(cat /tmp/abiversion)
else
ABIVERSION=$(cat standalone/android/abiversion)
fi
2013-09-22 18:29:22 +00:00
cd
2014-04-04 23:07:53 +00:00
rm -rf .ghc .cabal .android
cabal update
cabal install happy alex --bindir=$HOME/bin
PATH=$HOME/bin:$PATH
export PATH
mkdir -p .android
cd .android
git clone https://github.com/joeyh/ghc-android
cd ghc-android
git checkout stable-ghc-snapshot
./build
2013-09-23 14:25:21 +00:00
# This saves 2 gb, and the same sources are in build-*/ghc
rm -rf stage0
# 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/$ABIVERSION/bin/cc
2013-09-23 02:39:29 +00:00
git config --global user.email androidbuilder@example.com
git config --global user.name androidbuilder