source: trunk/dports/net/squid/Portfile

Last change on this file was 147517, checked in by jmr@…, 18 months ago

squid: remove conflict with squid3-devel since it no longer exists

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1# -*- 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
2# $Id: Portfile 147517 2016-04-06 16:13:27Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name            squid
7version         2.7.STABLE9
8revision        4
9set branch      [join [lrange [split ${version} .] 0 1] .]
10categories      net
11platforms       darwin
12license         GPL-2+
13maintainers     jmr openmaintainer
14description     advanced proxy caching server for http, https, ftp, gopher
15long_description    Squid is a high-performance proxy caching server for \
16                web clients, supporting FTP, gopher, and HTTP data \
17                objects. Unlike traditional caching software, Squid \
18                handles all requests in a single, non-blocking, \
19                I/O-driven process. Squid keeps meta data and \
20                especially hot objects cached in RAM, caches DNS \
21                lookups, supports non-blocking DNS lookups, and \
22                implements negative caching of failed requests.
23
24homepage        http://www.squid-cache.org/
25master_sites    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/v2/${branch}/ \
31                ftp://ftp.squid-cache.org/pub/squid/
32
33checksums       md5 3c6642c85470b1079207d43bba25a819 \
34                sha1 bd389da9b74fd338e358f6b3f83bd3a1ed4d4f6f \
35                rmd160 bfa7c3dc3ede68646603f3379de35f44d7d8e97d
36
37use_bzip2       yes
38patchfiles      patch-cf.data.pre.diff \
39                patch-configure.diff \
40                patch-pam_auth.c.diff \
41                src__ssl_support.c.diff
42
43depends_lib     port:zlib
44
45conflicts       squid3
46
47configure.args  --with-pthreads \
48                --mandir=${prefix}/share/man \
49                --sysconfdir=${prefix}/etc/squid \
50                --datadir=${prefix}/share/squid \
51                --localstatedir=${prefix}/var/squid \
52                --libexecdir=${prefix}/libexec/squid \
53                --enable-delay-pools \
54                --enable-removal-policies \
55                --enable-storeio=ufs,aufs,diskd,coss,null \
56                --enable-auth=negotiate,ntlm,digest,basic \
57                --enable-negotiate-auth-helpers=squid_kerb_auth \
58                --enable-ntlm-auth-helpers=SMB,fakeauth,no_check \
59                --enable-digest-auth-helpers=eDirectory,ldap,password \
60                --enable-basic-auth-helpers=DB,LDAP,MSNT,NCSA,PAM,POP3,SASL,SMB,YP,getpwnam,multi-domain-NTLM,squid_radius_auth
61post-configure {
62    if {[variant_isset universal]} {
63        system "cd ${worksrcpath} && ed - ${worksrcpath}/include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"
64    }
65}
66
67set pidfile     ${prefix}/var/run/squid/squid.pid
68
69build.args      DEFAULT_PID_FILE=${pidfile}
70use_parallel_build  yes
71
72startupitem.create      yes
73startupitem.name        Squid
74startupitem.netchange   yes
75startupitem.pidfile     auto ${pidfile}
76startupitem.start \
77    "cd ${prefix}/var/squid" \
78    "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
79    "    ${prefix}/sbin/squid -s -z" \
80    "fi" \
81    "${prefix}/sbin/squid -s"
82startupitem.stop \
83    "cd ${prefix}/var/squid" \
84    "${prefix}/sbin/squid -k shutdown" \
85    "while ${prefix}/sbin/squid -k check; do" \
86    "    sleep 1" \
87    "done"
88
89add_users       squid group=squid home=${prefix}/var/squid
90
91post-destroot   {
92    xinstall -o squid -g squid -m 755 -d \
93        ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \
94        ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs
95    file delete -force ${destroot}${prefix}/etc/squid/squid.conf \
96                       ${destroot}${prefix}/etc/squid/mime.conf \
97                       ${destroot}${prefix}/etc/squid/msntauth.conf
98    move ${destroot}${prefix}/etc/squid/cachemgr.conf \
99         ${destroot}${prefix}/etc/squid/cachemgr.conf.default
100}
101destroot.keepdirs   ${destroot}${prefix}/var/run/squid \
102                ${destroot}${prefix}/var/squid/cache \
103                ${destroot}${prefix}/var/squid/logs
104
105post-activate {
106    # Make sure initial conf files are present and setup correctly
107    foreach f { squid.conf mime.conf cachemgr.conf msntauth.conf } {
108        if {![file exists ${prefix}/etc/squid/${f}]} {
109            file copy ${prefix}/etc/squid/${f}.default \
110                ${prefix}/etc/squid/${f}
111        }
112    }
113}
114
115variant openssl description "Enable SSL/TLS support using OpenSSL" {
116    depends_lib-append      path:lib/libssl.dylib:openssl
117    configure.args-append   --with-openssl=${prefix} \
118                            --enable-ssl
119}
120
121default_variants    +openssl
122
123livecheck.type  regex
124livecheck.url   http://www.squid-cache.org/Versions/v2/${branch}/
125livecheck.regex squid-(${branch}\\.STABLE\[0-9\\.\]+)-RELEASENOTES
Note: See TracBrowser for help on using the repository browser.