|
Lines 1-72
Link Here
|
| 1 |
# New ports collection makefile for: squid24 |
1 |
# New ports collection makefile for: squid |
| 2 |
# Date created: Tue Mar 27 14:56:08 CEST 2001 |
2 |
# Date created: Tue Mar 27 14:56:08 CEST 2001 |
| 3 |
# Whom: Adrian Chadd <adrian@FreeBSD.org> |
3 |
# Whom: Adrian Chadd <adrian@FreeBSD.org> |
| 4 |
# |
4 |
# |
| 5 |
# $FreeBSD: ports/www/squid/Makefile,v 1.101 2003/07/27 08:45:10 adrian Exp $ |
5 |
# $FreeBSD: ports/www/squid/Makefile,v 1.101 2003/07/27 08:45:10 adrian Exp $ |
| 6 |
# |
6 |
# |
|
|
7 |
# Tunables: |
| 8 |
# WITH_SQUID_PINGER: install the external icmp helper program (`pinger') |
| 9 |
# for hierarchy stats and selection (default: no) |
| 10 |
# WITH_SQUID_DNSSERVER: install the external dns helper program (`dnsserver') |
| 11 |
# (default: do not install) |
| 12 |
# WITHOUT_SQUID_UNLINKD: do not install and use an external unlink daemon |
| 13 |
# (default: install) |
| 14 |
# WITH_SQUID_DIGEST_AUTH: install support for digest authentication |
| 15 |
# WITH_SQUID_LDAP_AUTH: install external modules for authentication against |
| 16 |
# LDAP servers |
| 17 |
# SQUID_{U,G}ID: which user/group ID squid should run as (default: squid/squid) |
| 7 |
|
18 |
|
| 8 |
PORTNAME= squid |
19 |
PORTNAME= squid |
| 9 |
PORTVERSION= 2.5 |
20 |
PORTVERSION= 2.5.4 |
| 10 |
PORTREVISION= 4 |
21 |
PORTREVISION= |
| 11 |
CATEGORIES= www |
22 |
CATEGORIES= www |
| 12 |
MASTER_SITES= \ |
23 |
|
|
|
24 |
MAINTAINER= adrian@freebsd.org |
| 25 |
COMMENT= The successful WWW proxy cache and accelerator |
| 26 |
|
| 27 |
MASTER_SITE_SUBDIR= squid-2/STABLE |
| 28 |
MASTER_SITES= \ |
| 13 |
ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ |
29 |
ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ |
| 14 |
ftp://www.unimelb.edu.au/pub/cwis/servers/unix/squid/%SUBDIR%/ \ |
30 |
ftp://ftp.unimelb.edu.au/pub/cwis/servers/unix/squid/%SUBDIR%/ \ |
|
|
31 |
ftp://ftp.leo.org/pub/comp/general/infosys/www/servers/squid/%SUBDIR%/ \ |
| 15 |
ftp://sunsite.auc.dk/pub/infosystems/squid/%SUBDIR%/ \ |
32 |
ftp://sunsite.auc.dk/pub/infosystems/squid/%SUBDIR%/ \ |
| 16 |
ftp://ftp.net.lut.ac.uk/squid/%SUBDIR%/ \ |
|
|
| 17 |
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/squid/&,} |
33 |
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/squid/&,} |
| 18 |
MASTER_SITE_SUBDIR= squid-2/STABLE |
34 |
DISTFILES= squid-2.5.STABLE4.tar.gz |
| 19 |
DISTNAME= squid-2.5.STABLE3 |
|
|
| 20 |
EXTRACT_SUFX= .tar.bz2 |
| 21 |
DIST_SUBDIR= squid2.5 |
35 |
DIST_SUBDIR= squid2.5 |
| 22 |
|
36 |
.if !defined(NOPORTDOCS) |
|
|
37 |
MASTER_SITES+= http://www.squid-cache.org/Doc/FAQ/:doc |
| 38 |
DISTFILES+= FAQ.tar.gz:doc |
| 39 |
IGNOREFILES+= FAQ.tar.gz |
| 40 |
.endif |
| 23 |
PATCH_SITES= http://www.squid-cache.org/Versions/v2/2.5/bugs/ |
41 |
PATCH_SITES= http://www.squid-cache.org/Versions/v2/2.5/bugs/ |
| 24 |
PATCHFILES= squid-2.5.STABLE3-deny_info.patch \ |
42 |
PATCHFILES= squid-2.5.STABLE4-reconfigure_message.patch \ |
| 25 |
squid-2.5.STABLE3-cache_dir_doc.patch \ |
43 |
squid-2.5.STABLE4-digest_auth_pwchange.patch \ |
| 26 |
squid-2.5.STABLE3-devnull.patch \ |
44 |
squid-2.5.STABLE4-redirect_login_space.patch \ |
| 27 |
squid-2.5.STABLE3-log_quote.patch \ |
45 |
squid-2.5.STABLE4-fqdnnegcache.patch \ |
| 28 |
squid-2.5.STABLE3-rfc_reference.patch \ |
46 |
pam_auth-2.2.patch \ |
| 29 |
squid-2.5.STABLE3-external_acl_ident.patch \ |
47 |
squid-2.5.STABLE4_auth_param_doc.patch \ |
| 30 |
squid-2.5.STABLE3-gcc-3_3.patch \ |
48 |
squid-2.5.STABLE4-error_load_text.patch \ |
| 31 |
squid-2.5.STABLE3-carpfactor.patch \ |
49 |
squid-2.5.STABLE4-xpi_mime.patch \ |
| 32 |
squid-2.5.STABLE3-neighbor_type_domain.patch \ |
50 |
squid-2.5.STABLE4-size_overflow.patch |
| 33 |
squid-2.5.STABLE3-header_access_peer.patch \ |
51 |
PATCH_DIST_STRIP= -p1 |
| 34 |
squid-2.5.STABLE3-memwarnsbrk.patch \ |
|
|
| 35 |
squid-2.5.STABLE3-hostscomments.patch \ |
| 36 |
squid-2.5.STABLE3-store_check_cachable_stats.patch \ |
| 37 |
squid-2.5.STABLE3-cachePeerPingsSentsnmp.patch \ |
| 38 |
squid-2.5.STABLE3-minimum_retry_timeout.patch \ |
| 39 |
squid-2.5.STABLE3-tcp_reset_leak.patch \ |
| 40 |
squid-2.5.STABLE3-hostheader.patch \ |
| 41 |
squid-2.5.STABLE3-reply_body_max_size.patch \ |
| 42 |
squid-2.5.STABLE3-ie_refresh.patch \ |
| 43 |
squid-2.5.STABLE3-http_reply_access-denied.patch \ |
| 44 |
squid-2.5.STABLE3-SENT_PASV.patch \ |
| 45 |
squid-2.5.STABLE3-peer_digest_not_found_assertion.patch \ |
| 46 |
squid-2.5.STABLE3-round_robin_max_size.patch |
| 47 |
PATCH_DIST_STRIP= -p1 |
| 48 |
|
52 |
|
| 49 |
MAINTAINER= adrian@freebsd.org |
53 |
WRKSRC= ${WRKDIR}/${PORTNAME}-2.5.STABLE4 |
| 50 |
COMMENT= The successful WWW proxy cache and accelerator |
|
|
| 51 |
|
54 |
|
| 52 |
GNU_CONFIGURE= yes |
55 |
GNU_CONFIGURE= yes |
| 53 |
USE_BZIP2= yes |
|
|
| 54 |
USE_PERL5= yes |
56 |
USE_PERL5= yes |
| 55 |
USE_REINPLACE= yes |
57 |
USE_REINPLACE= yes |
| 56 |
# Follow the apache port's lead... |
58 |
|
| 57 |
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin --sysconfdir=${PREFIX}/etc/squid \ |
59 |
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin --sysconfdir=${PREFIX}/etc/squid \ |
| 58 |
--datadir=${PREFIX}/etc/squid \ |
60 |
--datadir=${PREFIX}/etc/squid \ |
| 59 |
--localstatedir=${PREFIX}/squid \ |
61 |
--localstatedir=${PREFIX}/squid \ |
| 60 |
--enable-storeio="ufs diskd null" \ |
62 |
--enable-storeio="ufs diskd null" \ |
| 61 |
--enable-removal-policies="lru heap" \ |
63 |
--enable-removal-policies="lru heap" \ |
| 62 |
--enable-auth=basic --enable-basic-auth-helpers="NCSA PAM YP" \ |
|
|
| 63 |
--enable-external-acl-helpers="ip_user unix_group" \ |
| 64 |
--enable-underscores |
64 |
--enable-underscores |
| 65 |
|
65 |
|
|
|
66 |
STRIP= # won't install scripts correctly otherwise. |
| 66 |
MAKEFILE= Makefile |
67 |
MAKEFILE= Makefile |
| 67 |
MAN8= pam_auth.8 squid_unix_group.8 squid.8 |
|
|
| 68 |
|
68 |
|
| 69 |
# Some other configure options.. |
69 |
SQUID_UID?= squid |
|
|
70 |
SQUID_GID?= squid |
| 71 |
|
| 72 |
MAN8= squid.8 |
| 73 |
|
| 74 |
docs= QUICKSTART README RELEASENOTES.html doc/debug-sections.txt |
| 75 |
libexec= cachemgr.cgi |
| 76 |
sbin= squidclient squid |
| 77 |
|
| 78 |
# authentication methods and modules: |
| 79 |
|
| 80 |
auth_methods= basic ntlm |
| 81 |
basic_auth= NCSA PAM YP MSNT |
| 82 |
external_acl= ip_user unix_group |
| 83 |
MAN8+= pam_auth.8 squid_unix_group.8 |
| 84 |
libexec+= ip_user_check msnt_auth ntlm_auth ncsa_auth pam_auth \ |
| 85 |
squid_unix_group yp_auth |
| 86 |
|
| 87 |
.ifdef WITH_SQUID_DIGEST_AUTH |
| 88 |
auth_methods+= digest |
| 89 |
CONFIGURE_ARGS+= --enable-digest-auth-helpers="password" |
| 90 |
libexec+= digest_pw_auth |
| 91 |
PLIST_SUB+= DIGEST_AUTH_HELPER="" |
| 92 |
.else |
| 93 |
PLIST_SUB+= DIGEST_AUTH_HELPER="@comment " |
| 94 |
.endif |
| 95 |
|
| 96 |
.ifdef WITH_SQUID_LDAP_AUTH |
| 97 |
USE_OPENLDAP= yes |
| 98 |
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ |
| 99 |
LDFLAGS="-L${LOCALBASE}/lib" |
| 100 |
basic_auth+= LDAP |
| 101 |
external_acl+= ldap_group |
| 102 |
MAN8+= squid_ldap_auth.8 squid_ldap_group.8 |
| 103 |
libexec+= squid_ldap_auth squid_ldap_group |
| 104 |
PLIST_SUB+= LDAP_AUTH_HELPER="" |
| 105 |
.else |
| 106 |
PLIST_SUB+= LDAP_AUTH_HELPER="@comment " |
| 107 |
.endif |
| 108 |
|
| 109 |
CONFIGURE_ARGS+= --enable-auth="${auth_methods}" \ |
| 110 |
--enable-basic-auth-helpers="${basic_auth}" \ |
| 111 |
--enable-external-acl-helpers="${external_acl}" \ |
| 112 |
--enable-ntlm-auth-helpers="SMB" |
| 113 |
|
| 114 |
# Other external helper programs: |
| 115 |
|
| 116 |
.ifdef WITH_SQUID_DNSSERVER |
| 117 |
CONFIGURE_ARGS+= --disable-internal-dns |
| 118 |
PLIST_SUB+= DNSSERVER="" |
| 119 |
libexec+= dnsserver |
| 120 |
.else |
| 121 |
PLIST_SUB+= DNSSERVER="@comment " |
| 122 |
.endif |
| 123 |
.ifdef WITH_SQUID_PINGER |
| 124 |
CONFIGURE_ARGS+= --enable-icmp |
| 125 |
PLIST_SUB+= PINGER="" |
| 126 |
.else |
| 127 |
PLIST_SUB+= PINGER="@comment " |
| 128 |
.endif |
| 129 |
.ifdef WITHOUT_SQUID_UNLINKD |
| 130 |
CONFIGURE_ARGS+= --disable-unlinkd |
| 131 |
PLIST_SUB+= UNLINKD="@comment " |
| 132 |
.else |
| 133 |
libexec+= unlinkd |
| 134 |
PLIST_SUB+= UNLINKD="" |
| 135 |
.endif |
| 136 |
|
| 137 |
# Some other configure options: |
| 138 |
# |
| 70 |
# - Compile and use the malloc package from Doug Lea |
139 |
# - Compile and use the malloc package from Doug Lea |
| 71 |
#CONFIGURE_ARGS+= --enable-dlmalloc |
140 |
#CONFIGURE_ARGS+= --enable-dlmalloc |
| 72 |
# - Compile and use the supplied GNUregex routines instead of BSD regex. |
141 |
# - Compile and use the supplied GNUregex routines instead of BSD regex. |
|
Lines 79-86
Link Here
|
| 79 |
#CONFIGURE_ARGS+= --enable-xmalloc-statistics |
148 |
#CONFIGURE_ARGS+= --enable-xmalloc-statistics |
| 80 |
# - Enable CARP support |
149 |
# - Enable CARP support |
| 81 |
#CONFIGURE_ARGS+= --enable-carp |
150 |
#CONFIGURE_ARGS+= --enable-carp |
| 82 |
# - Enable ICMP pinging for heirarchy stats and selection |
|
|
| 83 |
#CONFIGURE_ARGS+= --enable-icmp |
| 84 |
# - Enable delay pools to limit bandwidth usage |
151 |
# - Enable delay pools to limit bandwidth usage |
| 85 |
#CONFIGURE_ARGS+= --enable-delay-pools |
152 |
#CONFIGURE_ARGS+= --enable-delay-pools |
| 86 |
# - Enable generic memory use tracing |
153 |
# - Enable generic memory use tracing |
|
Lines 106-116
Link Here
|
| 106 |
#CONFIGURE_ARGS+= --enable-htcp |
173 |
#CONFIGURE_ARGS+= --enable-htcp |
| 107 |
# - Enable Forw/Via database |
174 |
# - Enable Forw/Via database |
| 108 |
#CONFIGURE_ARGS+= --enable-forw-via-db |
175 |
#CONFIGURE_ARGS+= --enable-forw-via-db |
| 109 |
# - Use Cache Digests - see http://squid.nlanr.net/Squid/FAQ/FAQ-16.html |
176 |
# - Use Cache Digests - see http://www.squid-cache.org/Doc/FAQ/FAQ-16.html |
| 110 |
#CONFIGURE_ARGS+= --enable-cache-digests |
177 |
#CONFIGURE_ARGS+= --enable-cache-digests |
| 111 |
# - Select language for Error pages (see errors dir) |
178 |
# - Select language for Error pages (see errors dir) |
| 112 |
#CONFIGURE_ARGS+= --enable-err-language=lang |
179 |
#CONFIGURE_ARGS+= --enable-err-language=lang |
| 113 |
# (--enable-poll is not needed, it's detected correctly on 3.0) |
|
|
| 114 |
# - Strict HTTP compliance |
180 |
# - Strict HTTP compliance |
| 115 |
#CONFIGURE_ARGS+= --disable-http-violations |
181 |
#CONFIGURE_ARGS+= --disable-http-violations |
| 116 |
# - Enable Transparent Proxy support for IP-Filter systems (incl 3.0) |
182 |
# - Enable Transparent Proxy support for IP-Filter systems (incl 3.0) |
|
Lines 118-162
Link Here
|
| 118 |
# (--enable-leakfinder is a developer support tool only) |
184 |
# (--enable-leakfinder is a developer support tool only) |
| 119 |
# - Compile out code that does optional Ident (RFC931) lookups |
185 |
# - Compile out code that does optional Ident (RFC931) lookups |
| 120 |
#CONFIGURE_ARGS+= --disable-ident-lookups |
186 |
#CONFIGURE_ARGS+= --disable-ident-lookups |
| 121 |
# - Disable squid's internal async DNS lookup code. |
|
|
| 122 |
#CONFIGURE_ARGS+= --disable-internal-dns |
| 123 |
# - Use truncate() rather than unlink() |
187 |
# - Use truncate() rather than unlink() |
| 124 |
#CONFIGURE_ARGS+= --enable-truncate |
188 |
#CONFIGURE_ARGS+= --enable-truncate |
| 125 |
# - accept the illegal '_' character in hostnames. |
|
|
| 126 |
#CONFIGURE_ARGS+= --enable-underscores |
| 127 |
# - Enable control of different heap replacement algorithms at runtime. |
189 |
# - Enable control of different heap replacement algorithms at runtime. |
| 128 |
#CONFIGURE_ARGS+= --enable-removal-policies |
190 |
#CONFIGURE_ARGS+= --enable-removal-policies |
| 129 |
|
191 |
|
| 130 |
post-patch: |
192 |
post-patch: |
| 131 |
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure |
193 |
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure |
| 132 |
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/doc/squid.8 |
194 |
@${REINPLACE_CMD} -e 's|/etc/squid/|${PREFIX}/etc/squid/|g' ${WRKSRC}/doc/squid.8 |
|
|
195 |
.if !defined(NOPORTDOCS) |
| 196 |
@cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} <${FILESDIR}/FAQ.html.patch |
| 197 |
.endif |
| 198 |
|
| 199 |
pre-configure: |
| 200 |
.if defined(PACKAGE_BUILDING) || defined(BATCH) |
| 201 |
@${ECHO} ""; \ |
| 202 |
${ECHO} "This port has the following tunables:"; \ |
| 203 |
${ECHO} ""; \ |
| 204 |
${ECHO} " SQUID_UID (default: ${SQUID_UID})"; \ |
| 205 |
${ECHO} " SQUID_GID (default: ${SQUID_GID})"; \ |
| 206 |
${ECHO} " WITH_SQUID_PINGER - install the external icmp helper program (default: no)"; \ |
| 207 |
${ECHO} " WITH_SQUID_DNSSERVER - install the external dns helper program (default: no)"; \ |
| 208 |
${ECHO} " WITHOUT_SQUID_UNLINKD - do not install and use an external unlink daemon"; \ |
| 209 |
${ECHO} " (default: install)"; \ |
| 210 |
${ECHO} " WITH_SQUID_DIGEST_AUTH - install support for digest authentication"; \ |
| 211 |
${ECHO} " WITH_SQUID_LDAP_AUTH - install external modules for authentication against"; \ |
| 212 |
${ECHO} " LDAP servers"; \ |
| 213 |
${ECHO} ""; \ |
| 214 |
${ECHO} "Hit Ctrl-C within 10 seconds to abort."; \ |
| 215 |
${ECHO} ""; \ |
| 216 |
sleep 10 |
| 217 |
.endif |
| 218 |
@${REINPLACE_CMD} -e 's|%%SQUID_UID%%|${SQUID_UID}|g' \ |
| 219 |
-e 's|%%SQUID_GID%%|${SQUID_GID}|g' ${WRKSRC}/src/cf.data.pre |
| 220 |
|
| 221 |
pre-install: |
| 222 |
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' -e 's|%%SQUID_UID%%|${SQUID_UID}|g' ${FILESDIR}/squid.sh.sample >${WRKSRC}/squid.sh.sample |
| 223 |
@env SQUID_UID=${SQUID_UID} SQUID_GID=${SQUID_GID} \ |
| 224 |
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL |
| 133 |
|
225 |
|
| 134 |
post-install: |
226 |
post-install: |
| 135 |
# I don't think many people use the pinger nowadays, and if you |
227 |
.ifdef WITH_SQUID_PINGER |
| 136 |
# do you'll want squid in its own group so as to restrict access |
228 |
cd ${WRKSRC}; make install-pinger; \ |
| 137 |
# to it. |
229 |
${STRIP_CMD} ${PREFIX}/libexec/pinger; \ |
| 138 |
# cd ${WRKSRC}/src; make install-pinger |
230 |
${CHMOD} 4710 ${PREFIX}/libexec/pinger; \ |
| 139 |
.for sbin_file in client squid |
231 |
${CHGRP} ${SQUID_GID} ${PREFIX}/libexec/pinger |
| 140 |
if [ -f ${PREFIX}/sbin/${sbin_file} ] ; then \ |
232 |
.endif |
| 141 |
${STRIP_CMD} ${PREFIX}/sbin/${sbin_file} ; \ |
233 |
.for dir in libexec sbin |
| 142 |
fi |
234 |
.for file in ${${dir}} |
|
|
235 |
${STRIP_CMD} ${PREFIX}/${dir}/${file} |
| 236 |
.endfor |
| 143 |
.endfor |
237 |
.endfor |
| 144 |
.for libexec_file in cachemgr.cgi dnsserver pinger unlinkd |
238 |
${INSTALL_SCRIPT} ${WRKSRC}/squid.sh.sample ${PREFIX}/etc/rc.d |
| 145 |
if [ -f ${PREFIX}/libexec/${libexec_file} ] ; then \ |
239 |
.if !defined(NOPORTDOCS) |
| 146 |
${STRIP_CMD} ${PREFIX}/libexec/${libexec_file} ; \ |
240 |
${MKDIR} ${DOCSDIR} |
| 147 |
fi |
241 |
${INSTALL_DATA} ${WRKDIR}/FAQ*.html ${DOCSDIR} |
|
|
242 |
.for file in ${docs} |
| 243 |
${INSTALL_MAN} ${WRKSRC}/${file} ${DOCSDIR} |
| 148 |
.endfor |
244 |
.endfor |
| 149 |
@if [ ! -d ${PREFIX}/squid/logs ]; then \ |
245 |
.endif |
| 150 |
${MKDIR} ${PREFIX}/squid/logs; \ |
246 |
@env PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
| 151 |
${CHOWN} nobody:nogroup ${PREFIX}/squid/logs; \ |
|
|
| 152 |
fi |
| 153 |
@if [ ! -d ${PREFIX}/squid/cache ]; then \ |
| 154 |
${MKDIR} ${PREFIX}/squid/cache; \ |
| 155 |
${CHOWN} nobody:nogroup ${PREFIX}/squid/cache; \ |
| 156 |
fi |
| 157 |
@if [ ! -f ${PREFIX}/etc/rc.d/squid.sh ]; then \ |
| 158 |
${ECHO} "Installing ${PREFIX}/etc/rc.d/squid.sh startup file."; \ |
| 159 |
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \ |
| 160 |
fi |
| 161 |
|
247 |
|
| 162 |
.include <bsd.port.mk> |
248 |
.include <bsd.port.mk> |