Last active
June 26, 2016 21:03
-
-
Save codebam/609eaa59bc649cb774364324a86c0bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commands starting with # should be run as root or sudo | |
Commands starting with $ should be run by your regular user | |
You will need a seperate directory for symlinks to old versions of python and | |
java. To do this we need to create a new directory that can be added to our | |
$PATH environment variable. | |
# mkdir /build_path | |
# pacman -S git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip libxslt python2-virtualenv bc rsync jdk7-openjdk | |
If you already have some of these packages you will get warnings that you are | |
reinstalling packages, this is totally fine but if you want to remove them from | |
the list of packages you are installing so that you aren't wasting bandwidth | |
then go ahead and do that. | |
Now refer to the Arch Wiki on how to enable the multilib repository in pacman | |
if it isn't already enabled, then install these packages. | |
# pacman -S gcc-multilib lib32-zlib | |
Refer to the Arch Wiki on how to install these AUR packages. Use any AUR | |
helper you want, or cower and makepkg. | |
NOTICE: THIS COMMAND SHOULD NOT BE RUN AS ROOT | |
$ mkdir packages; cd $_ | |
$ cower -d ncurses5-compat-libs lib32-ncurses5-compat-libs lib32-readline pngcrush repo android-sdk libtinfo-5 | |
With my above example you will need to cd into each directory and makepkg -s, | |
pacman -U. If you don't know how, refer to the Arch Wiki. | |
# ln -s /usr/bin/python2 /build_path/python | |
# ln -s /usr/bin/python2-config /build_path/python-config | |
# ln -s /usr/lib/jvm/java-7-openjdk/bin/java /build_path/java | |
# ln -s /usr/lib/jvm/java-7-openjdk/bin/javac /build_path/javac | |
Assuming you have followed this guide from the this far, you can now create a | |
file to hold your environment settings when you want to build. Call it whatever | |
you want to and store it wherever you like, but this is what it should contain. | |
#!/bin/bash | |
export PATH=/opt/android-sdk/tools:$PATH | |
export PATH=/opt/android-sdk/tools:$PATH | |
export PATH=/build_path:$PATH | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ | |
export LANG=C | |
Now before building, you run this command. Assuming that's what it is called and | |
where you saved it. | |
$ source ~/android_environment.sh | |
If you have clang errors when building, you need to merge this commit http://review.cyanogenmod.org/#/c/120824/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please leave a comment if you think there is an error 😃