# $Id: Portfile,v 1.13 2005/10/06 19:26:31 mww Exp $ PortSystem 1.0 name squid version 2.5.STABLE11 categories net platforms darwin maintainers mww@opendarwin.org description advanced proxy caching server for http, https, ftp, gopher long_description Squid is a high-performance proxy caching server for \ web clients, supporting FTP, gopher, and HTTP data \ objects. Unlike traditional caching software, Squid \ handles all requests in a single, non-blocking, \ I/O-driven process. Squid keeps meta data and \ especially hot objects cached in RAM, caches DNS \ lookups, supports non-blocking DNS lookups, and \ implements negative caching of failed requests. homepage http://www.squid-cache.org/ master_sites ${homepage}/Versions/v2/2.5/ checksums md5 5e7f13ad95b64b60ddd6cdc2ab800d67 use_bzip2 yes patchfiles patch-cf.data.pre.diff depends_lib port:openssl configure.args --with-pthreads \ --mandir=${prefix}/share/man \ --sysconfdir=${prefix}/etc/squid \ --datadir=${prefix}/share/squid \ --localstatedir=${prefix}/var/squid \ --with-openssl=${prefix} 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 } post-destroot { 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 } 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 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 8 { configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 }