Corrected acronym expansion for PCRE
authorIan Silvester <iansilvester@fastmail.fm>
Tue, 27 Mar 2012 09:56:07 +0000 (09:56 +0000)
committerIan Silvester <iansilvester@fastmail.fm>
Tue, 27 Mar 2012 09:56:07 +0000 (09:56 +0000)
OS X Package Builder HOWTO.txt

index 7b96111..1179bd2 100644 (file)
@@ -14,6 +14,7 @@ ASSUMPTIONS
 OVERVIEW OF STEPS
 
 1. Build the privoxy binary
+1.1 Consider whether to use external or bundled PCRE.
 2. Construct the package contents hierarchy
 3. Build the package
 
@@ -24,34 +25,52 @@ DETAILS
 
 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 (range of) platform(s). The recommended usage is:
+Use build.sh to build a privoxy binary for the desired (range of) platform(s). The simplest usage is:
 
 ./build.sh leopardupwards
 
-which will build a Universal binary containing targets for PPC, i386 and x86_64 processor architectures that'll run on all Macintosh OS X versions from 10.5 (Leopard) and upwards.
+which will build a Universal binary containing targets for PPC, i386 and x86_64 processor architectures that'll run on all Macintosh OS X versions from 10.5 (Leopard) and upwards. If however you would prefer to, for example, build a binary that runs solely on 64 bit Intel processors, you could instead use:
+
+./build.sh snowleopard64
+
+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.
+
+
+There are two important further considerations that this approach brings. Firstly, you must ensure when building PCRE that you build it to support the same minimum version of OS X that you wish Privoxy to support (note that by default PCRE will assume the OS X version of the build machine is the minimum version to be supported). Failure to observe this will mean that, whilst Privoxy will still build, the external PCRE check will fail and you will end up compiling in the bundled PCRE, not linking to the external PCRE library as you'd intended.
+
+The second consideration when using external PCRE is that the PCRE build process allows only single-architecture libraries to be built; the corollary being that your Privoxy binary must also be single-architecture. The outcome of not following this rule would be as above; you will succeed in building Privoxy but it will compile in the bundled PCRE rather than linking to the external library.
+
 
 
 2. Construct the package contents hierarchy
 
-Use constructPkgContent.sh to build the hierarchy of folders and files necessary for building the package. This will construct a new folder named 'pkg content' and copy in the binary, documentation and supporting files.
+Use constructPkgContent.sh to build the hierarchy of folders and files necessary for building the package. 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.
 
-Once this is done, the following file will need to be edited:
+Once this is done, the file 'pkg resources/interface texts/ReadMe.txt' will need to be edited to give a precis of what this release of Privoxy brings. This can be distilled from the README for the latest Privoxy project release.
 
-pkg resources/interface texts/ReadMe.txt
-- this can be distilled from the README for the latest Privoxy project release
 
 
 3. Build the package
 
-Open OSX 10.5+.pmdoc in PackageMaker (OSX 10.4.pmdoc is supplied for Tiger since a different package format is required there). See the separate document "Packagemaker Instructions.txt" if you wish to create a package from scratch; otherwise only the following list of entries will need to be changed to match the Privoxy version you're working with (see Packagemaker Instructions.txt for more details about restrictions on the values you can set):
+Three different Packagemaker project files are supplied, though the procedure is the same regardless of which you need to use:
+
+- OS X 10.5+ PCRE.pmdoc - if you have built Privoxy against an external PCRE library (see 1.1 above).
+- OS X 10.5+.pmdoc - if you are using the bundled PCRE library.
+- OS X 10.4.pmdoc - for Tiger builds with the bundled PCRE library.
 
-Distribution left-menu item>Configuration>Title
-pkg content left-menu item>pkg content>Configuration>Package Identifier
+Refer to the separate document "Packagemaker Instructions.txt" for complete instructions, however the following covers the list of mandatory changes to make per release:
 
-You will then need to navigate to the following pane:
+'Distribution left-menu item>Configuration>Title'
+'pkg content left-menu item>pkg content>Configuration>Package Identifier'
 
-pkg content left-menu item>pkg content>Scripts
+Navigate to 'pkg content left-menu item>pkg content>Scripts'
 
-and drag and drop 'pkg resources/single-binary scripts' into the 'Scripts directory' entry box. This MUST be left as an 'absolute' path due to a bug in PackageMaker; if you select 'relative to project' then the scripts will not be found nor added to the package at build time.
+and drag and drop the directory 'pkg resources/single-binary scripts' from your file browser (e.g. Finder) into the 'Scripts directory' entry box. This MUST be left as an 'absolute' path due to a bug in PackageMaker; if you select 'relative to project' then the scripts will not be found nor added to the package at build time.
 
 Finally click the 'Build' button at screen top-left. The package filename is up to you but I recommend "Privoxy <version>.pkg", e.g. "Privoxy 3.0.19.pkg". For the down-level release I have used "Privoxy <version> OS X 10.4.mpkg"
\ No newline at end of file