# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name squid version 2.7.STABLE6 set branch [join [lrange [split ${version} .] 0 1] .] categories net platforms darwin maintainers jmr openmaintainer 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 http://mirrors.24-7-solutions.net/pub/squid/ \ http://mirror.aarnet.edu.au/pub/squid/squid/ \ http://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ \ http://ftp.ring.gr.jp/archives/net/www/squid/ \ ftp://ftp.is.co.za/pub/squid/ \ ftp://ftp1.cl.squid-cache.org/pub/squid/ \ http://www.squid-cache.org/Versions/v2/${branch}/ \ ftp://ftp.squid-cache.org/pub/squid/ checksums md5 6de3a6a7a56a7ecae092f2d31a04f039 \ sha1 b4b323be1ff3617a22070c243b2504f30d6b302d \ rmd160 d804175b95c6b026abed505b086eeaa2c479d2e2 use_bzip2 yes patchfiles patch-cf.data.pre.diff depends_lib port:openssl port:zlib platform darwin 9 { patchfiles-append patch-configure.diff } configure.args --with-pthreads \ --mandir=${prefix}/share/man \ --sysconfdir=${prefix}/etc/squid \ --datadir=${prefix}/share/squid \ --localstatedir=${prefix}/var/squid \ --with-openssl=${prefix} \ --enable-delay-pools \ --enable-removal-policies \ --enable-storeio=ufs,aufs,diskd,coss,null post-configure { if {[variant_isset universal]} { system "cd ${worksrcpath} && ed - ${worksrcpath}/include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1" } } build.args DEFAULT_PID_FILE=${prefix}/var/run/squid/squid.pid use_parallel_build yes startupitem.create yes startupitem.name Squid startupitem.start \ "cd ${prefix}/var/squid" \ "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \ "\tsu -fm root -c \"exec ${prefix}/sbin/squid -s -z\"" \ "fi" \ "su -fm root -c \"exec ${prefix}/sbin/squid -s\"" startupitem.stop \ "cd ${prefix}/var/squid" \ "su -fm root -c \"exec ${prefix}/sbin/squid -k shutdown\"" 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 \ ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \ ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs file delete -force ${destroot}${prefix}/etc/squid/squid.conf \ ${destroot}${prefix}/etc/squid/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} } } } livecheck.check regex livecheck.url http://www.squid-cache.org/Versions/v2/${branch}/ livecheck.regex squid-(${branch}\\.STABLE\[0-9\\.\]+)-RELEASENOTES