[or-cvs] r20825: {projects} Build information for building libevent and Tor. (projects/android/trunk/Orbot)

ioerror at seul.org ioerror at seul.org
Sun Oct 25 02:47:28 UTC 2009


Author: ioerror
Date: 2009-10-24 22:47:27 -0400 (Sat, 24 Oct 2009)
New Revision: 20825

Modified:
   projects/android/trunk/Orbot/BUILD
Log:
Build information for building libevent and Tor.


Modified: projects/android/trunk/Orbot/BUILD
===================================================================
--- projects/android/trunk/Orbot/BUILD	2009-10-25 01:06:59 UTC (rev 20824)
+++ projects/android/trunk/Orbot/BUILD	2009-10-25 02:47:27 UTC (rev 20825)
@@ -1,7 +1,7 @@
 This document explains how to properly build an Android package of Orbot from
 source.
 
-Please install the following prerequisites:
+Please install the following prerequisites (instructions for each follows):
 	Android OS SDK
 	droid-wrapper: http://github.com/tmurakam/droid-wrapper
 	libevent source
@@ -39,11 +39,40 @@
 	cd droid-wrapper
 	sudo make install
 
-XXX TODO: Explain build process for making a static Tor with our libevent, etc.
-zlib and OpenSSL are included with the Android OS SDK.
+zlib and OpenSSL are included with the Android OS SDK. You'll need to build
+libevent and finally Tor. We'll create an externals directory for this code:
 
-Build libevent:
+	mkdir -p ~/mydroid/external/{libevent,tor}
 
-Build Tor:
+We need to set to environment variables for droid-gcc:
+	export DROID_ROOT=~/mydroid/
+	export DROID_TARGET=generic
 
+Fetch and build libevent:
+
+	cd ~/mydroid/external/libevent
+	svn co https://levent.svn.sourceforge.net/svnroot/levent .
+	cd trunk/libevent/
+	export LIBEVENTDIR=`pwd`
+	./autogen.sh
+	CC=droid-gcc LD=droid-ld ./configure --host=arm-none-linux-gnueabi
+	make
+
+Fetch and build Tor:
+
+	export OPENSSLDIR=`cd ~/mydroid/external/openssl/include/ && pwd`
+	export ZLIBDIR=`cd ~/mydroid/external/zlib && pwd`
+
+	cd ~/mydroid/external/tor
+	git clone https://git.torproject.org/git/tor.git
+	cd tor/
+	CC=droid-gcc LD=droid-ld ./configure --host=arm-none-linux-gnueabi \
+	--with-libevent-dir=$LIBEVENTDIR --with-openssl-dir=$OPENSSLDIR \
+	--with-zlib-dir=$ZLIBDIR
+	make
+
+At this point, you'll have a Tor binary that can be run on an Android handset.
+This isn't enough though and we'll now sew up the binary into a small package
+that will handle basic Tor controlling features.
+
 XXX TODO: Explain build process for making a .apk file for install.



More information about the tor-commits mailing list