INTRODUCTION This document will guide you through the complete process necessary to create a Privoxy zip package (hereafter 'package') for iOS, starting from the Privoxy source code. This package can then be sent to the maintainer of the chosen Cydia repository for processing and hosting. ASSUMPTIONS 1. That the Privoxy CVS project is available in a folder parallel to the one containing this file. If building for release it should have been exported from Sourceforge to a folder named 'dist', pinned at whichever release you intend to build (as per the instructions in the developer manual), you might have simply checked out the head of the CVS project to a folder named 'current'. If you are using a folder name other than these two you will be prompted to enter it. 2. That you have Xcode installed, including the SDKs for the minimum iOS version you intend your package(s) to support. 3. That your build machine runs Snow Leopard (OS X 10.6). It will likely work equally well on Leopard or Lion (or later), but PackageMaker is substantially different in Tiger and earlier versions of OS X (even the project file format is different). 4. All references to files and folders in this document should be assumed to be within the iOSBuildSystem folder unless stated otherwise. OVERVIEW OF STEPS 1. Build the privoxy binary 1.1 Consider whether to use external or bundled PCRE. 2. Construct the package contents zip file 3. How to install manually DETAILS 1. Build the privoxy binary Use privoxy-create.sh (run via sudo) to create the privoxy group and user; these are a prerequisite for the build process. Use build.sh to build a privoxy binary for the desired minimum platform. For example: ./build.sh 4.3 will build an ARM binary that'll run on all iOS devices running iOS 4.3 and upwards. Running build.sh without supplying any parameters will cause it to list all the possible options. 1.1 Consider whether to use external or bundled PCRE. Privoxy uses the Perl Compatible Regular Expressions (PCRE) library when matching its rules against the folder-and-file part of a target URL. Privoxy ships with a bundled PCRE library that, whilst convenient, is very out of date. The recommendation is therefore to download, make and install the latest PCRE distribution to your build machine and compile Privoxy against that instead. build.sh takes an optional second parameter (-pcre) which tells it to look for an installation of the PCRE library in the standard location on the build machine. 2. Construct the package contents hierarchy Use constructZip.sh to build the hierarchy of folders and files and zip them into the destination zip file - org.ijbswa.privoxy.zip. This will construct a new folder named 'pkg content' and copy in the binary, documentation and supporting files. If you are bundling an external PCRE fileset, use the optional switch -pcre to instruct constructPkgContent.sh to include those files. 3. How to install manually Privoxy can only be installed and run on a jailbroken iDevice. - Copy the zip file from 'pkg content' into the root directory on the iDevice. This can be achieved in many ways; I used the NetATalk Cydia package that installs the AFP file protocol on the iDevice which allows one to connect to it as a shared drive. - unzip org.ijbswa.privoxy.zip - change into the newly-created DEBIAN subfolder - chmod the scripts to make them executable - run ./preinstall - run ./postinstall - In Settings->WiFi->[your network name]->HTTP Proxy enter 127.0.0.1 for the server and 8118 for the port From now on, all HTTP communications whilst on the WiFi network will pass via Privoxy's filtering.