annotate net-proxy/squid/squid-3.1.18.ebuild @ 323:77b65d2cbc35

bump to 7u4-b16
author holger
date Sat, 17 Mar 2012 10:04:50 +0100
parents 1062fc902f74
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
310
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
1 # Copyright 1999-2011 Gentoo Foundation
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/squid-3.1.16.ebuild,v 1.7 2011/12/18 20:54:49 halcy0n Exp $
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
4
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
5 EAPI=4
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
6
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
7 inherit eutils pam toolchain-funcs autotools linux-info
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
8
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
9 DESCRIPTION="A full-featured web proxy cache"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
10 HOMEPAGE="http://www.squid-cache.org/"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
11 SRC_URI="http://www.squid-cache.org/Versions/v3/3.1/${P}.tar.gz"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
12
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
13 LICENSE="GPL-2"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
14 SLOT="0"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
15 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
16 IUSE="caps ipv6 pam ldap samba sasl kerberos nis radius ssl snmp selinux logrotate test \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
17 ecap icap-client \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
18 mysql postgres sqlite \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
19 zero-penalty-hit \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
20 pf-transparent ipf-transparent kqueue \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
21 elibc_uclibc kernel_linux +epoll tproxy"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
22
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
23 COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
24 pam? ( virtual/pam )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
25 ldap? ( net-nds/openldap )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
26 kerberos? ( virtual/krb5 )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
27 ssl? ( dev-libs/openssl )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
28 sasl? ( dev-libs/cyrus-sasl )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
29 ecap? ( net-libs/libecap )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
30 selinux? ( sec-policy/selinux-squid )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
31 !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
32 >=sys-libs/db-4
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
33 dev-lang/perl"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
34 DEPEND="${COMMON_DEPEND}
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
35 sys-apps/ed
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
36 test? ( dev-util/cppunit )"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
37 RDEPEND="${COMMON_DEPEND}
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
38 samba? ( net-fs/samba )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
39 mysql? ( dev-perl/DBD-mysql )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
40 postgres? ( dev-perl/DBD-Pg )
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
41 sqlite? ( dev-perl/DBD-SQLite )"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
42
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
43 REQUIRED_USE="tproxy? ( caps )"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
44
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
45 pkg_pretend() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
46 if grep -qs '^[[:space:]]*cache_dir[[:space:]]\+coss' "${ROOT}"etc/squid/squid.conf; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
47 eerror "coss store IO has been disabled by upstream due to stability issues!"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
48 eerror "If you want to install this version, switch the store type to something else"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
49 eerror "before attempting to install this version again."
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
50
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
51 die "/etc/squid/squid.conf: cache_dir uses a disabled store type"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
52 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
53
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
54 if use tproxy; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
55 echo
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
56 elog "Checking kernel configuration for full Tproxy4 support"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
57 local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_TPROXY ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
58 linux-info_pkg_setup
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
59 echo
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
60 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
61 }
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
62
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
63 pkg_setup() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
64 enewgroup squid 31
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
65 enewuser squid 31 -1 /var/cache/squid squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
66 }
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
67
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
68 src_prepare() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
69 epatch "${FILESDIR}"/${PN}-3.1.15-gentoo.patch
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
70 eautoreconf
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
71 }
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
72
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
73 src_configure() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
74 local myconf=""
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
75
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
76 local basic_modules="getpwnam,NCSA,MSNT"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
77 use samba && basic_modules="SMB,multi-domain-NTLM,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
78 use ldap && basic_modules="LDAP,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
79 use pam && basic_modules="PAM,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
80 use sasl && basic_modules="SASL,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
81 use nis && ! use elibc_uclibc && basic_modules="YP,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
82 use radius && basic_modules="squid_radius_auth,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
83 if use mysql || use postgres || use sqlite ; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
84 basic_modules="DB,${basic_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
85 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
86
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
87 local digest_modules="password"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
88 use ldap && digest_modules="ldap,${digest_modules}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
89
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
90 local ext_helpers="ip_user,session,unix_group"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
91 use samba && ext_helpers="wbinfo_group,${ext_helpers}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
92 use ldap && ext_helpers="ldap_group,${ext_helpers}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
93
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
94 local ntlm_helpers="fakeauth"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
95 use samba && ntlm_helpers="smb_lm,${ntlm_helpers}"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
96
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
97 local negotiate_helpers=
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
98 if use kerberos; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
99 negotiate_helpers="squid_kerb_auth"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
100 if has_version app-crypt/mit-krb5; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
101 myconf="--enable-mit --disable-heimdal"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
102 elif has_version app-crypt/heimdal; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
103 myconf="--disable-mit --enable-heimdal"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
104 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
105 else
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
106 myconf="--disable-mit --disable-heimdal"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
107 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
108
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
109 # coss support has been disabled
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
110 # If it is re-enabled again, make sure you don't enable it for elibc_uclibc (#61175)
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
111 myconf="${myconf} --enable-storeio=ufs,diskd,aufs"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
112
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
113 if use kernel_linux; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
114 myconf="${myconf} --enable-linux-netfilter \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
115 $(use_enable tproxy linux-tproxy) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
116 $(use_enable epoll)"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
117 elif use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
118 myconf="${myconf} $(use_enable kqueue)"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
119 if use pf-transparent; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
120 myconf="${myconf} --enable-pf-transparent"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
121 elif use ipf-transparent; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
122 myconf="${myconf} --enable-ipf-transparent"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
123 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
124 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
125
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
126 export CC=$(tc-getCC)
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
127
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
128 econf \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
129 --sysconfdir=/etc/squid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
130 --libexecdir=/usr/libexec/squid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
131 --localstatedir=/var \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
132 --with-pidfile=/var/run/squid.pid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
133 --datadir=/usr/share/squid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
134 --with-logdir=/var/log/squid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
135 --with-default-user=squid \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
136 --enable-auth="basic,digest,negotiate,ntlm" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
137 --enable-removal-policies="lru,heap" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
138 --enable-digest-auth-helpers="${digest_modules}" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
139 --enable-basic-auth-helpers="${basic_modules}" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
140 --enable-external-acl-helpers="${ext_helpers}" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
141 --enable-ntlm-auth-helpers="${ntlm_helpers}" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
142 --enable-negotiate-auth-helpers="${negotiate_helpers}" \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
143 --enable-useragent-log \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
144 --enable-cache-digests \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
145 --enable-delay-pools \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
146 --enable-referer-log \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
147 --enable-arp-acl \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
148 --with-large-files \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
149 --with-filedescriptors=8192 \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
150 --disable-strict-error-checking \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
151 $(use_with caps libcap) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
152 $(use_enable ipv6) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
153 $(use_enable snmp) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
154 $(use_enable ssl) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
155 $(use_enable icap-client) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
156 $(use_enable ecap) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
157 $(use_enable zero-penalty-hit zph-qos) \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
158 ${myconf}
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
159 }
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
160
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
161 src_install() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
162 emake DESTDIR="${D}" install || die "emake install failed"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
163
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
164 # need suid root for looking into /etc/shadow
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
165 fowners root:squid /usr/libexec/squid/ncsa_auth
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
166 fperms 4750 /usr/libexec/squid/ncsa_auth
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
167 if use pam; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
168 fowners root:squid /usr/libexec/squid/pam_auth
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
169 fperms 4750 /usr/libexec/squid/pam_auth
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
170 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
171
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
172 # some cleanups
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
173 rm -f "${D}"/usr/bin/Run*
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
174
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
175 dodoc CONTRIBUTORS CREDITS ChangeLog QUICKSTART SPONSORS doc/*.txt \
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
176 helpers/ntlm_auth/no_check/README.no_check_ntlm_auth
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
177 newdoc helpers/basic_auth/SMB/README README.auth_smb
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
178 dohtml helpers/basic_auth/MSNT/README.html RELEASENOTES.html
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
179 newdoc helpers/basic_auth/LDAP/README README.auth_ldap
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
180 doman helpers/basic_auth/LDAP/*.8
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
181 dodoc helpers/basic_auth/SASL/squid_sasl_auth*
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
182
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
183 newpamd "${FILESDIR}/squid.pam" squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
184 newconfd "${FILESDIR}/squid.confd" squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
185 if use logrotate; then
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
186 newinitd "${FILESDIR}/squid.initd-logrotate" squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
187 insinto /etc/logrotate.d
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
188 newins "${FILESDIR}/squid.logrotate" squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
189 else
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
190 newinitd "${FILESDIR}/squid.initd" squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
191 exeinto /etc/cron.weekly
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
192 newexe "${FILESDIR}/squid.cron" squid.cron
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
193 fi
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
194
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
195 rm -rf "${D}"/var
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
196 diropts -m0755 -o squid -g squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
197 keepdir /var/cache/squid /var/log/squid
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
198 }
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
199
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
200 pkg_postinst() {
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
201 echo
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
202 elog "Squid authentication helpers have been installed suid root."
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
203 elog "This allows shadow based authentication (see bug #52977 for more)."
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
204 echo
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
205 elog "Be careful what type of cache_dir you select!"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
206 elog " 'diskd' is optimized for high levels of traffic, but it might seem slow"
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
207 elog "when there isn't sufficient traffic to keep squid reasonably busy."
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
208 elog " If your traffic level is low to moderate, use 'aufs' or 'ufs'."
1062fc902f74 bump squid to latest
holger
parents:
diff changeset
209 }