Skip to content
Permalink
Browse files

update to 2.5.STABLE11, some cleaning up

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@14445 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Oct 6, 2005
1 parent 25d0ee7 commit 68d0cc72bf2315e24126c8b9e9f0c10c62947359
Showing with 30 additions and 46 deletions.
  1. +27 −43 net/squid/Portfile
  2. +3 −3 net/squid/files/patch-cf.data.pre.diff
@@ -1,10 +1,9 @@
# $Id: Portfile,v 1.12 2005/08/11 21:33:24 rshaw Exp $
# $Id: Portfile,v 1.13 2005/10/06 19:26:31 mww Exp $

PortSystem 1.0

name squid
version 2.5.STABLE10
revision 1
version 2.5.STABLE11
categories net
platforms darwin
maintainers mww@opendarwin.org
@@ -20,7 +19,7 @@ long_description Squid is a high-performance proxy caching server for \

homepage http://www.squid-cache.org/
master_sites ${homepage}/Versions/v2/2.5/
checksums md5 e6db8bdfc783b3baed7de803c9a39e55
checksums md5 5e7f13ad95b64b60ddd6cdc2ab800d67
use_bzip2 yes
patchfiles patch-cf.data.pre.diff

@@ -35,60 +34,45 @@ configure.args --with-pthreads \

build.args DEFAULT_PID_FILE=${prefix}/var/run/squid/squid.pid

startupitem.create yes
startupitem.name Squid
startupitem.start \
"cd ${prefix}/var/squid" \
"if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
"\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \
"fi" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -s\""
startupitem.stop \
"cd ${prefix}/var/squid" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""

pre-destroot {
addgroup squid
set gid [existsgroup squid]
adduser squid gid=${gid} realname=Squid\ Proxy home=${prefix}/var/squid
}
destroot.keepdirs ${destroot}${prefix}/var/run/squid \
${destroot}${prefix}/var/squid/cache \
${destroot}${prefix}/var/squid/logs
post-destroot {
cd ${destroot}${prefix}
reinplace "s|/etc/squid|${prefix}/etc/squid|g" share/man/man8/squid.8
reinplace "s|/etc/squid|${prefix}/etc/squid|g" \
${destroot}${prefix}/share/man/man8/squid.8
xinstall -o squid -g squid -m 755 -d \
var/run/squid var/squid var/squid/cache var/squid/logs
cd ${destroot}${prefix}/etc/squid
file delete -force squid.conf mime.conf
file rename squid.conf.default squid.conf-dist
file rename mime.conf.default mime.conf-dist
# squid start/stop rc script (if non-Darwin)
if {![variant_isset darwin]} {
xinstall -d -m 0755 etc/rc.d
xinstall -m 0755 ${filespath}/squid.sh.in etc/rc.d/squid.sh
reinplace "s|__PREFIX|${prefix}|g" etc/rc.d/squid.sh
reinplace "s|__UID|squid|g" etc/rc.d/squid.sh
}
}

pre-install {
addgroup squid
set gid [existsgroup squid]
adduser squid gid=${gid} realname=Squid\ Proxy home=${prefix}/var/squid
}
destroot.keepdirs ${destroot}${prefix}/var/run/squid \
${destroot}${prefix}/var/squid/cache \
${destroot}${prefix}/var/squid/logs

post-activate {
# Make sure initial conf files are present and setup correctly
if {![file exists ${prefix}/etc/squid/squid.conf]} {
xinstall -m 0644 ${prefix}/etc/squid/squid.conf-dist \
${prefix}/etc/squid/squid.conf
}
if {![file exists ${prefix}/etc/squid/mime.conf]} {
xinstall -m 0644 ${prefix}/etc/squid/mime.conf-dist \
${prefix}/etc/squid/mime.conf
foreach f { squid.conf mime.conf } {
if {![file exists ${prefix}/etc/squid/${f}]} {
file copy ${prefix}/etc/squid/${f}.default \
${prefix}/etc/squid/${f}
}
}
}

platform darwin {
startupitem.create yes
startupitem.name Squid
startupitem.start \
"cd ${prefix}/var/squid" \
"if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
"\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \
"fi" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -s\""
startupitem.stop \
"cd ${prefix}/var/squid" \
"su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""
platform darwin 8 {
configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
@@ -1,5 +1,5 @@
--- src/cf.data.pre.orig 2005-05-11 01:08:40.000000000 +0200
+++ src/cf.data.pre 2005-05-25 17:58:35.000000000 +0200
--- src/cf.data.pre 2005-09-13 15:44:35.000000000 +0200
+++ src/cf.data.pre 2005-10-06 21:10:41.000000000 +0200
@@ -2199,10 +2199,10 @@
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
@@ -13,7 +13,7 @@
# Example rule allowing access from your local networks. Adapt
# to list your (internal) IP networks from where browsing should
# be allowed
@@ -2446,12 +2446,12 @@
@@ -2471,12 +2471,12 @@

NAME: cache_effective_user
TYPE: string

0 comments on commit 68d0cc7

Please sign in to comment.
You can’t perform that action at this time.