r11607@catbus: nickm | 2007-01-30 17:19:27 -0500
[tor.git] / doc / tor-osx-dmg-creation.txt
blobfbff021140eaf5da789e062f70044a4a8e948196
1 ## Instructions for building the official dmgs for OSX.
2 ##
4 The following steps are the exact steps used to produce the "official"
5 OSX builds of tor
7 Summary:
8 1) Compile and install a static version of the latest release of
9 libevent.
10 2) Acquire privoxyosx_setup_3.0.6.zip.  
11 http://downloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.6.zip?modtime=1164104652&big_mirror=0
12   Remember where you put this file.
13 3) Acquire and install your preferred version of tor via "make
14 dist-osx"
16 Details:
17 ### Compiling libevent
19 1)  Download the latest libevent from
20 http://www.monkey.org/~provos/libevent/
22 2) The first step of compiling libevent is to configure it as
23 follows:
24        ./configure --enable-static --disable-shared
26 3) Complete the "make" and "make install".  You will need to be root,
27 or sudo -s, to complete the "make install".
29 4) If you have previouslly installed libevent, go rm the old libevent.so*
30 files so the linker doesn't get suckered into using them.
33 ### Acquiring privoxy
35 1) Download osx privoxy source from
36 http://downloads.sourceforge.net/ijbswa/privoxyosx_setup_3.0.6.zip?modtime=1164104652&big_mirror=0
38 2) Edit /path/to/tor/contrib/osx/package.sh and confirm
39 PRIVOXY_PKG_ZIP= is set to the correct path to find the
40 file privoxyosx_setup_3.0.6.zip
43 ## Compiling Tor
45 1) Get your preferred version of the tor source from tor.eff.org.
47 2) In the top level, this means /path/to/tor/, not tor/contrib/osx,
48 do a configure with these parameters:
49      CONFDIR=/Library/Tor ./configure --prefix=/Library/Tor \
50      --bindir=/Library/Tor --sysconfdir=/Library  \
51      --enable-static --disable-shared
53 3) In same top level dir, do a "make dist-osx".  There now exists a
54 .dmg file in the same directory.  Install from this dmg.
57 ## Universal Binaries for OSX PPC and X86
59 1) Install XCode 2.4 updates available from http://developer.apple.com.
61 2)  Download latest libevent from
62 http://www.monkey.org/~provos/libevent/
64 3) The first step of compiling libevent is to configure it as
65 follows:
66 CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
67 \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
68        ./configure --enable-static --disable-shared \
69        --disable-dependency-tracking
71 3) Complete the "make" and "make install".  You will need to be root,
72 or sudo -s, to complete the "make install".
74 4) If you have previouslly installed libevent, rm the old libevent.*, located
75 by default, in /usr/local/lib/.  
77 5) Check for a successful universal binary of libevent.a in, by default,
78 /usr/local/lib by using the following command:
79         file /usr/local/lib/libevent.a
81         Your output should be:
82 /usr/local/lib/libevent.a: Mach-O fat file with 2 architectures
83 /usr/local/lib/libevent.a (for architecture i386):      current ar archive random library
84 /usr/local/lib/libevent.a (for architecture ppc):       current ar archive
86 6) Get your preferred version of the tor source from tor.eff.org.
88 7) In the top level, this means /path/to/tor/, not tor/contrib/osx,
89 do a configure with these parameters:
90 CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
91 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \
92 CONFDIR=/Library/Tor \
93 ./configure --prefix=/Library/Tor --bindir=/Library/Tor \
94 --sysconfdir=/Library --enable-static --disable-shared \
95 --disable-dependency-tracking
97 8) "make dist-osx"
99 9) Confirm you have created a universal binary by issuing the follow command:
100 file src/or/tor
101 src/or/tor: Mach-O fat file with 2 architectures
102 src/or/tor (for architecture i386):     Mach-O executable i386
103 src/or/tor (for architecture ppc):      Mach-O executable ppc
105 Congrats.  You have a universal binary.