5 # Purpose : Establish settings common to the build and privoxy-create
8 # Copyright : Written by and Copyright (C) 2001-2012 the
9 # Privoxy team. http://www.privoxy.org/
11 # This program is free software; you can redistribute it
12 # and/or modify it under the terms of the GNU General
13 # Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at
15 # your option) any later version.
17 # This program is distributed in the hope that it will
18 # be useful, but WITHOUT ANY WARRANTY; without even the
19 # implied warranty of MERCHANTABILITY or FITNESS FOR A
20 # PARTICULAR PURPOSE. See the GNU General Public
21 # License for more details.
23 # The GNU General Public License should be included with
24 # this file. If not, you can view it at
25 # http://www.gnu.org/copyleft/gpl.html
26 # or write to the Free Software Foundation, Inc.,
27 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
30 # Modification : If you modify this file please consider whether your
31 # changes ought to be passed back to the OSXPackageBuilder
35 #========================================
36 # target specific settings
37 #========================================
40 # mac os x release name
45 # check the release name
47 case "${release_name}" in
48 # Mac OS X 10.7 (64bit only)
50 XCODE_PATH="`/usr/bin/xcode-select -print-path`"
51 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.7.sdk"
52 MACOSX_VERSION="-mmacosx-version-min=10.7"
54 STARTUP="LaunchDaemon"
58 XCODE_PATH="`/usr/bin/xcode-select -print-path`"
59 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.6.sdk"
60 MACOSX_VERSION="-mmacosx-version-min=10.6"
62 STARTUP="LaunchDaemon"
66 XCODE_PATH="`/usr/bin/xcode-select -print-path`"
67 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.6.sdk"
68 MACOSX_VERSION="-mmacosx-version-min=10.6"
70 STARTUP="LaunchDaemon"
72 # Mac OS X 10.5 and all later releases
74 XCODE_PATH="`/usr/bin/xcode-select -print-path`"
75 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.5.sdk"
76 MACOSX_VERSION="-mmacosx-version-min=10.5"
77 ARCH="-arch x86_64 -arch i386 -arch ppc"
78 STARTUP="LaunchDaemon"
82 XCODE_PATH="`/usr/bin/xcode-select -print-path`"
83 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.5.sdk"
84 MACOSX_VERSION="-mmacosx-version-min=10.5"
85 ARCH="-arch i386 -arch ppc"
86 STARTUP="LaunchDaemon"
90 XCODE_PATH="/Developer"
91 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.4u.sdk"
92 MACOSX_VERSION="-mmacosx-version-min=10.4"
93 ARCH="-arch i386 -arch ppc"
94 STARTUP="LaunchDaemon"
98 XCODE_PATH="/Developer"
99 SYSROOT="-isysroot ${XCODE_PATH}/SDKs/MacOSX10.3.9.sdk"
100 MACOSX_VERSION="-mmacosx-version-min=10.3"
102 STARTUP="StartupItem"
115 #========================================
116 # host specific settings
117 #========================================
120 # darwin os major release number
122 darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`"
125 # check the release number
127 case "${darwin_major_rel_num}" in
128 # Mac OS X 10.5 or higher
130 GNAME="`/usr/bin/dscl /Local/Default -list /groups | /usr/bin/grep -E '^(_)?privoxy?'`"
131 UNAME="`/usr/bin/dscl /Local/Default -list /users | /usr/bin/grep -E '^(_)?privoxy?'`"
132 SCRIPT="privoxy-create-dscl.sh"
133 OPTS="--with-user=_privoxy --with-group=_privoxy"
135 # Mac OS X 10.4, 10.3
137 GNAME="`/usr/bin/nireport . /groups name | /usr/bin/grep -E '^privoxy?'`"
138 UNAME="`/usr/bin/nireport . /users name | /usr/bin/grep -E '^privoxy?'`"
139 SCRIPT="privoxy-create-nicl.sh"
140 OPTS="--with-user=privoxy --with-group=privoxy"
152 # identify the directory containing Privoxy's source
160 if [ -d current ]; then
161 DIRS_FOUND=$(( DIRS_FOUND + 10 ))
163 case "${DIRS_FOUND}" in
164 # only 'current' found
172 # either both or neither found
174 read -p 'Could not select the Privoxy source directory. Please supply the directory name: ' SOURCE_DIR
178 echo "Using ../${SOURCE_DIR} as location of Privoxy source"