Lines 1-14
Link Here
|
1 |
# Copyright 1999-2009 Gentoo Foundation |
1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/squid-3.1.0.15_beta-r1.ebuild,v 1.1 2009/11/29 08:53:09 mrness Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
EAPI="2" |
5 |
EAPI="3" |
6 |
|
6 |
|
7 |
inherit eutils pam toolchain-funcs |
7 |
inherit base eutils pam toolchain-funcs |
8 |
|
8 |
|
9 |
DESCRIPTION="A full-featured web proxy cache" |
9 |
DESCRIPTION="A full-featured web proxy cache" |
10 |
HOMEPAGE="http://www.squid-cache.org/" |
10 |
HOMEPAGE="http://www.squid-cache.org/" |
11 |
SRC_URI="http://www.squid-cache.org/Versions/v3/3.1/${P/_beta}.tar.gz" |
11 |
SRC_URI="http://www.squid-cache.org/Versions/v3/3.1/${P}.tar.gz" |
12 |
|
12 |
|
13 |
LICENSE="GPL-2" |
13 |
LICENSE="GPL-2" |
14 |
SLOT="0" |
14 |
SLOT="0" |
Lines 19-24
Link Here
|
19 |
zero-penalty-hit \ |
19 |
zero-penalty-hit \ |
20 |
pf-transparent ipf-transparent kqueue \ |
20 |
pf-transparent ipf-transparent kqueue \ |
21 |
elibc_uclibc kernel_linux +epoll" |
21 |
elibc_uclibc kernel_linux +epoll" |
|
|
22 |
|
22 |
RESTRICT=test |
23 |
RESTRICT=test |
23 |
|
24 |
|
24 |
COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) |
25 |
COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) |
Lines 32-51
Link Here
|
32 |
!x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) |
33 |
!x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) |
33 |
>=sys-libs/db-4 |
34 |
>=sys-libs/db-4 |
34 |
dev-lang/perl" |
35 |
dev-lang/perl" |
|
|
36 |
|
35 |
DEPEND="${COMMON_DEPEND} |
37 |
DEPEND="${COMMON_DEPEND} |
36 |
sys-devel/automake |
38 |
sys-devel/automake |
37 |
sys-devel/autoconf |
39 |
sys-devel/autoconf |
38 |
sys-devel/libtool |
40 |
sys-devel/libtool |
39 |
test? ( dev-util/cppunit )" |
41 |
test? ( dev-util/cppunit )" |
|
|
42 |
|
40 |
RDEPEND="${COMMON_DEPEND} |
43 |
RDEPEND="${COMMON_DEPEND} |
41 |
samba? ( net-fs/samba ) |
44 |
samba? ( net-fs/samba ) |
42 |
mysql? ( dev-perl/DBD-mysql ) |
45 |
mysql? ( dev-perl/DBD-mysql ) |
43 |
postgres? ( dev-perl/DBD-Pg ) |
46 |
postgres? ( dev-perl/DBD-Pg ) |
44 |
sqlite? ( dev-perl/DBD-SQLite )" |
47 |
sqlite? ( dev-perl/DBD-SQLite )" |
45 |
|
48 |
|
46 |
S="${WORKDIR}/${P/_beta}" |
49 |
PATCHES=( |
|
|
50 |
"${FILESDIR}/${P}-gentoo.patch" |
51 |
"${FILESDIR}/${P}-qafixes.patch" |
52 |
"${FILESDIR}/${P}-libmd5.patch" |
53 |
"${FILESDIR}/${P}-errorstate-leak-fix.patch" |
54 |
"${FILESDIR}/${P}-range-leak-fix-1.patch" |
55 |
"${FILESDIR}/${P}-range-leak-fix-2.patch" |
56 |
) |
47 |
|
57 |
|
48 |
pkg_setup() { |
58 |
pkg_pretend() { |
49 |
if grep -qs '^[[:space:]]*cache_dir[[:space:]]\+coss' "${ROOT}"etc/squid/squid.conf; then |
59 |
if grep -qs '^[[:space:]]*cache_dir[[:space:]]\+coss' "${ROOT}"etc/squid/squid.conf; then |
50 |
eerror "coss store IO has been disabled by upstream due to stability issues!" |
60 |
eerror "coss store IO has been disabled by upstream due to stability issues!" |
51 |
eerror "If you want to install this version, switch the store type to something else" |
61 |
eerror "If you want to install this version, switch the store type to something else" |
Lines 53-67
Link Here
|
53 |
|
63 |
|
54 |
die "/etc/squid/squid.conf: cache_dir use a disabled store type" |
64 |
die "/etc/squid/squid.conf: cache_dir use a disabled store type" |
55 |
fi |
65 |
fi |
|
|
66 |
} |
67 |
|
68 |
pkg_setup() { |
69 |
[ ${EAPI} -lt 4 ] && pkg_pretend |
56 |
|
70 |
|
57 |
enewgroup squid 31 |
71 |
enewgroup squid 31 |
58 |
enewuser squid 31 -1 /var/cache/squid squid |
72 |
enewuser squid 31 -1 /var/cache/squid squid |
59 |
} |
73 |
} |
60 |
|
74 |
|
61 |
src_prepare() { |
75 |
src_prepare() { |
62 |
epatch "${FILESDIR}"/${P}-gentoo.patch |
76 |
base_src_prepare |
63 |
epatch "${FILESDIR}"/${P}-qafixes.patch |
|
|
64 |
epatch "${FILESDIR}"/${P}-libmd5.patch |
65 |
|
77 |
|
66 |
# eautoreconf breaks lib/libLtdl/libtool script |
78 |
# eautoreconf breaks lib/libLtdl/libtool script |
67 |
./bootstrap.sh || die "autoreconf failed" |
79 |
./bootstrap.sh || die "autoreconf failed" |
Lines 77-82
Link Here
|
77 |
use sasl && basic_modules="SASL,${basic_modules}" |
89 |
use sasl && basic_modules="SASL,${basic_modules}" |
78 |
use nis && ! use elibc_uclibc && basic_modules="YP,${basic_modules}" |
90 |
use nis && ! use elibc_uclibc && basic_modules="YP,${basic_modules}" |
79 |
use radius && basic_modules="squid_radius_auth,${basic_modules}" |
91 |
use radius && basic_modules="squid_radius_auth,${basic_modules}" |
|
|
92 |
|
80 |
if use mysql || use postgres || use sqlite ; then |
93 |
if use mysql || use postgres || use sqlite ; then |
81 |
basic_modules="DB,${basic_modules}" |
94 |
basic_modules="DB,${basic_modules}" |
82 |
fi |
95 |
fi |
Lines 151-157
Link Here
|
151 |
} |
164 |
} |
152 |
|
165 |
|
153 |
src_install() { |
166 |
src_install() { |
154 |
emake DESTDIR="${D}" install || die "emake install failed" |
167 |
base_src_install |
155 |
|
168 |
|
156 |
# need suid root for looking into /etc/shadow |
169 |
# need suid root for looking into /etc/shadow |
157 |
fowners root:squid /usr/libexec/squid/ncsa_auth |
170 |
fowners root:squid /usr/libexec/squid/ncsa_auth |
Lines 172-177
Link Here
|
172 |
|
185 |
|
173 |
newpamd "${FILESDIR}/squid.pam" squid |
186 |
newpamd "${FILESDIR}/squid.pam" squid |
174 |
newconfd "${FILESDIR}/squid.confd" squid |
187 |
newconfd "${FILESDIR}/squid.confd" squid |
|
|
188 |
|
175 |
if use logrotate; then |
189 |
if use logrotate; then |
176 |
newinitd "${FILESDIR}/squid.initd-logrotate" squid |
190 |
newinitd "${FILESDIR}/squid.initd-logrotate" squid |
177 |
insinto /etc/logrotate.d |
191 |
insinto /etc/logrotate.d |
Lines 188-204
Link Here
|
188 |
} |
202 |
} |
189 |
|
203 |
|
190 |
pkg_postinst() { |
204 |
pkg_postinst() { |
191 |
echo |
|
|
192 |
ewarn "Squid authentication helpers have been installed suid root." |
205 |
ewarn "Squid authentication helpers have been installed suid root." |
193 |
ewarn "This allows shadow based authentication (see bug #52977 for more)." |
206 |
ewarn "This allows for shadow based authentication (see bug #52977 for more)." |
194 |
echo |
207 |
ewarn |
195 |
ewarn "Be careful what type of cache_dir you select!" |
208 |
ewarn "Be careful what type of cache_dir you select!" |
196 |
ewarn " 'diskd' is optimized for high levels of traffic, but it might seem slow" |
209 |
ewarn "'diskd' is optimized for high levels of traffic, but it might seem slow" |
197 |
ewarn "when there isn't sufficient traffic to keep squid reasonably busy." |
210 |
ewarn "where there isn't sufficient traffic to keep squid reasonably busy." |
198 |
ewarn " If your traffic level is low to moderate, use 'aufs' or 'ufs'." |
211 |
ewarn "If your traffic level is low to moderate, use 'aufs' or 'ufs'." |
199 |
echo |
212 |
ewarn |
200 |
ewarn "Squid can be configured to run in transparent mode like this:" |
213 |
ewarn "Squid can be configured to run in transparent mode like this:" |
201 |
ewarn " ${HILITE}http_port internal-addr:3128 transparent${NORMAL}" |
214 |
ewarn " ${HILITE}http_port internal-addr:3128 transparent${NORMAL}" |
|
|
215 |
|
202 |
if use zero-penalty-hit; then |
216 |
if use zero-penalty-hit; then |
203 |
echo |
217 |
echo |
204 |
ewarn "In order for zph_preserve_miss_tos to work, you will have to alter your kernel" |
218 |
ewarn "In order for zph_preserve_miss_tos to work, you will have to alter your kernel" |