Changeset 98594
- Timestamp:
- Oct 9, 2012, 2:57:17 PM (12 years ago)
- Location:
- trunk/dports/net/squid3-devel
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/net/squid3-devel/Portfile
r89580 r98594 4 4 PortSystem 1.0 5 5 6 replaced_by squid3 6 7 name squid3-devel 8 PortGroup obsolete 1.0 9 7 10 version 3.2.0.4 8 set branch [join [lrange [split ${version} .] 0 1] .] 11 revision 1 9 12 categories net 10 platforms darwin11 license GPL-2+12 maintainers snc openmaintainer13 description advanced proxy caching server for http, https, ftp, gopher14 long_description Squid is a high-performance proxy caching server for \15 web clients, supporting FTP, gopher, and HTTP data \16 objects. Unlike traditional caching software, Squid \17 handles all requests in a single, non-blocking, \18 I/O-driven process. Squid keeps meta data and \19 especially hot objects cached in RAM, caches DNS \20 lookups, supports non-blocking DNS lookups, and \21 implements negative caching of failed requests.22 23 homepage http://www.squid-cache.org/24 master_sites http://mirrors.24-7-solutions.net/pub/squid/ \25 http://mirror.aarnet.edu.au/pub/squid/squid/ \26 http://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ \27 http://ftp.ring.gr.jp/archives/net/www/squid/ \28 ftp://ftp.is.co.za/pub/squid/ \29 ftp://ftp1.cl.squid-cache.org/pub/squid/ \30 http://www.squid-cache.org/Versions/v3/${branch}/ \31 ftp://ftp.squid-cache.org/pub/squid/32 33 distname squid-${version}34 35 checksums rmd160 a982884dc513e29d39545e0c09e7ddf4d24a47f2 \36 sha256 54bd5f06c676862f5156b2da0cfd4d8c9d6d358227d90884fc1b54de24caf38b37 38 use_bzip2 yes39 patchfiles patch-cf.data.pre.diff40 41 depends_lib port:openssl port:zlib42 43 conflicts squid squid344 45 #configure.args46 #--with-pthreads \47 # --enable-shared \48 # --mandir=${prefix}/share/man \49 # --sysconfdir=${prefix}/etc/squid \50 # --datadir=${prefix}/share/squid \51 # --localstatedir=${prefix}/var/squid \52 # --with-openssl=${prefix} \53 # --enable-delay-pools \54 # --enable-removal-policies \55 # --enable-storeio=ufs,aufs,diskd \56 # --enable-disk-io=AIO,Blocking,DiskDaemon,DiskThreads \57 # --enable-icap-client \58 # --with-default-user=squid \59 # --disable-ipv660 #post-configure {61 # if {[variant_isset universal]} {62 # system "cd ${worksrcpath} && ed - ${worksrcpath}/include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"63 # }64 #}65 66 build.args DEFAULT_PID_FILE=${prefix}/var/run/squid/squid.pid67 use_parallel_build yes68 69 startupitem.create yes70 startupitem.name Squid71 set start_extra ""72 set stop_extra ""73 # this will insert firewall rules to force a specific user to use squid for their connections74 # this implementation will only impact rule numbers 100 and 101.75 # A user may be matched by name or identification number.76 # you will not want to force squid to use itself (infinite loop)77 if {[variant_isset ipfw_transparent] || [variant_isset https]} {78 append start_extra "ipfw add 99 allow tcp from me to any dst-port 80 uid squid out\n"79 append stop_extra "ipfw delete 99\n"80 }81 if {[variant_isset ipfw_transparent]} {82 append start_extra "ipfw add 100 fwd 127.0.0.1,3128 tcp from me to any dst-port 80 out\n"83 append stop_extra "ipfw delete 100\n"84 }85 if {[variant_isset https]} {86 append start_extra "ipfw add 101 fwd 127.0.0.1,3129 tcp from me to any dst-port 443 out\n"87 append stop_extra "ipfw delete 101\n"88 }89 startupitem.start \90 "cd ${prefix}/var/squid" \91 "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \92 "\tsu -fm root -c \"exec ${prefix}/sbin/squid -s -z\"" \93 "fi" \94 $start_extra \95 "su -fm root -c \"exec ${prefix}/sbin/squid -s\""96 startupitem.stop \97 "cd ${prefix}/var/squid" \98 $stop_extra \99 "su -fm root -c \"exec ${prefix}/sbin/squid -k shutdown\""100 101 pre-destroot {102 add_users squid group=squid realname=Squid\ Proxy home=${prefix}/var/squid103 }104 post-destroot {105 reinplace "s|/etc/squid|${prefix}/etc/squid|g" \106 ${destroot}${prefix}/share/man/man8/squid.8107 xinstall -o squid -g squid -m 755 -d \108 ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \109 ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs110 reinplace "s|http_port 3128|http_port 127.0.0.1:3128 intercept|" \111 ${destroot}${prefix}/etc/squid/squid.conf.default112 set config [open ${destroot}${prefix}/etc/squid/squid.conf.default a]113 if {[variant_isset https]} {114 puts $config "https_port 127.0.0.1:3129 intercept sslBump"115 puts $config "sslproxy_cafile ${prefix}/share/curl/curl-ca-bundle.crt"116 puts $config "# Bumped requests have relative URLs so Squid has to use"117 puts $config "# reverse proxy or accelerator code. By default, that"118 puts $config "# code denies direct forwarding. The need for this option"119 puts $config "# may disappear in the future."120 puts $config "always_direct allow all"121 puts $config ""122 puts $config "# if a site uses a self-signed certificate it will"123 puts $config "# produce errors"124 puts $config "#acl TrustedName dstdomain .domain.org"125 puts $config "#sslproxy_cert_error allow TrustedName"126 puts $config "#sslproxy_cert_error deny all"127 }128 puts $config "visible_hostname localhost"129 puts $config "shutdown_lifetime 1 second"130 close $config131 file delete -force ${destroot}${prefix}/etc/squid/squid.conf \132 ${destroot}${prefix}/etc/squid/mime.conf \133 ${destroot}${prefix}/etc/squid/cachemgr.conf134 }135 destroot.keepdirs ${destroot}${prefix}/var/run/squid \136 ${destroot}${prefix}/var/squid/cache \137 ${destroot}${prefix}/var/squid/logs138 139 post-activate {140 # Make sure initial conf files are present and setup correctly141 foreach f { squid.conf mime.conf cachemgr.conf } {142 if {![file exists ${prefix}/etc/squid/${f}]} {143 file copy ${prefix}/etc/squid/${f}.default \144 ${prefix}/etc/squid/${f}145 }146 }147 }148 149 variant kqueue description "Enable kqueue() support (experimental)" {150 configure.args-append --enable-kqueue151 }152 153 variant ipfw_transparent description "Enable transparent proxy support using IPFW" {154 configure.args-append --enable-ipfw-transparent155 }156 157 variant https requires ipfw_transparent description "Enable https client requests" {158 configure.args-append --enable-ssl159 depends_run-append port:curl-ca-bundle160 }161 162 startupitem.netchange yes163 164 livecheck.type regex165 livecheck.url http://www.squid-cache.org/Versions/v3/${branch}/166 livecheck.regex >squid-(${branch}\[.0-9\]+)<
Note: See TracChangeset
for help on using the changeset viewer.