You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
166 lines
6.4 KiB
Tcl
166 lines
6.4 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
|
|
name squid3
|
|
version 3.5.28
|
|
revision 2
|
|
set branch [join [lrange [split ${version} .] 0 1] .]
|
|
categories net
|
|
license GPL-2+
|
|
maintainers {jmr @jmroot} 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. \
|
|
Squid 3.x is the latest release series that does not \
|
|
need a C++11 compiler to build.
|
|
|
|
homepage http://www.squid-cache.org/
|
|
master_sites https://mirror.aarnet.edu.au/pub/squid/squid/ \
|
|
https://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/v3/${branch}/ \
|
|
ftp://ftp.squid-cache.org/pub/squid/
|
|
|
|
distname squid-${version}
|
|
use_xz yes
|
|
checksums md5 9367e0375ea53ba0e99f77054d4402c5 \
|
|
sha1 721241a270ec27d629d65ae17a50be56510e8441 \
|
|
rmd160 5c102be674a567d780590035e0ac3362e5b1a4b8
|
|
|
|
patchfiles patch-cf.data.pre.diff \
|
|
patch-compat_types.h.diff \
|
|
patch-basic_pam_auth.cc.diff \
|
|
configure-db.h.diff \
|
|
openssl-1.1.diff \
|
|
DOMAIN.patch
|
|
|
|
platform darwin 10 {
|
|
# ticket #37102, /usr/include/rpcsvc/yp_prot.h tries to redefine bool
|
|
patchfiles-append snowleopard-bool.diff
|
|
}
|
|
|
|
depends_build path:bin/pkg-config:pkgconfig
|
|
depends_lib port:zlib
|
|
|
|
conflicts squid squid2
|
|
|
|
set pidfile ${prefix}/var/run/squid/squid.pid
|
|
|
|
configure.args --mandir=${prefix}/share/man \
|
|
--sysconfdir=${prefix}/etc/squid \
|
|
--datadir=${prefix}/share/squid \
|
|
--localstatedir=${prefix}/var/squid \
|
|
--libexecdir=${prefix}/libexec/squid \
|
|
--with-swapdir=${prefix}/var/squid/cache \
|
|
--with-pidfile=${pidfile} \
|
|
--disable-strict-error-checking \
|
|
--disable-loadable-modules \
|
|
--disable-arch-native \
|
|
--without-gnutls \
|
|
--without-mit-krb5 \
|
|
--without-heimdal-krb5 \
|
|
--without-gnugss \
|
|
--enable-delay-pools \
|
|
--enable-zph-qos \
|
|
--enable-removal-policies \
|
|
--enable-storeio=ufs,aufs,diskd,rock \
|
|
--enable-disk-io=AIO,Blocking,DiskDaemon,DiskThreads,Mmapped \
|
|
--enable-log-daemon-helpers \
|
|
--with-default-user=squid \
|
|
--enable-auth \
|
|
--enable-auth-basic \
|
|
--enable-auth-digest \
|
|
--enable-auth-negotiate="wrapper" \
|
|
--enable-auth-ntlm \
|
|
--enable-external-acl-helpers="SQL_session eDirectory_userip file_userip time_quota unix_group wbinfo_group"
|
|
post-configure {
|
|
if {[variant_exists universal] && [variant_isset universal]} {
|
|
system -W ${worksrcpath} "ed - include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"
|
|
}
|
|
}
|
|
|
|
startupitem.create yes
|
|
startupitem.name Squid
|
|
startupitem.netchange yes
|
|
startupitem.pidfile clean ${pidfile}
|
|
startupitem.start \
|
|
"cd ${prefix}/var/squid" \
|
|
"if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
|
|
" ${prefix}/sbin/squid -s -z" \
|
|
"fi" \
|
|
"${prefix}/sbin/squid -s"
|
|
startupitem.stop \
|
|
"cd ${prefix}/var/squid" \
|
|
"${prefix}/sbin/squid -k shutdown" \
|
|
"while ${prefix}/sbin/squid -k check; do" \
|
|
" sleep 1" \
|
|
"done"
|
|
startupitem.restart \
|
|
"cd ${prefix}/var/squid" \
|
|
"${prefix}/sbin/squid -k reconfigure"
|
|
|
|
add_users squid group=squid home=${prefix}/var/squid
|
|
|
|
post-destroot {
|
|
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}${prefix}/etc/squid/cachemgr.conf \
|
|
${destroot}${prefix}/etc/squid/errorpage.css
|
|
}
|
|
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 cachemgr.conf errorpage.css } {
|
|
if {![file exists ${prefix}/etc/squid/${f}]} {
|
|
file copy ${prefix}/etc/squid/${f}.default \
|
|
${prefix}/etc/squid/${f}
|
|
}
|
|
}
|
|
}
|
|
|
|
variant openssl description "Enable SSL/TLS support using OpenSSL" {
|
|
#depends_lib-append path:lib/libssl.dylib:openssl
|
|
#configure.args-append --with-openssl=${prefix}
|
|
}
|
|
|
|
default_variants +openssl
|
|
|
|
if {[variant_isset openssl]} {
|
|
PortGroup openssl 1.0
|
|
openssl.branch 1.1
|
|
configure.args-append --with-openssl=[openssl::install_area]
|
|
}
|
|
|
|
variant ipfw_transparent description "Enable transparent proxy support using IPFW" {
|
|
configure.args-append --enable-ipfw-transparent
|
|
}
|
|
|
|
variant kerberos description "Enable MIT kerberos support" {
|
|
depends_lib-append port:kerberos5
|
|
configure.args-delete --enable-auth-negotiate="wrapper" \
|
|
--without-mit-krb5
|
|
configure.args-append --enable-auth-negotiate
|
|
}
|
|
|
|
notes "Squid 3.x is an older release series, and it is recommended to\
|
|
migrate to Squid 6 if possible."
|
|
|
|
livecheck.type regex
|
|
livecheck.url http://www.squid-cache.org/Versions/v3/${branch}/
|
|
livecheck.regex "squid-(\[0-9.\]+)-RELEASENOTES\\.html"
|