blob: d6b76167118f4c82c723585332ff424e5173d384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.2.1-r2.ebuild,v 1.3 2007/09/25 11:54:57 mrness Exp $
inherit eutils autotools
DESCRIPTION="Combined filter, redirector and access controller plugin for Squid."
HOMEPAGE="http://www.squidguard.org"
SRC_URI="http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86"
IUSE="ldap"
RDEPEND="net-proxy/squid
>=sys-libs/db-2
ldap? ( net-nds/openldap )"
DEPEND="${RDEPEND}
sys-devel/bison
sys-devel/flex"
S="${WORKDIR}/squidGuard-${PV}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-gentoo.patch"
epatch "${FILESDIR}/${P}-tests.patch"
epatch "${FILESDIR}/${P}-regexp.patch"
eautoconf
}
src_compile() {
econf \
$(use_with ldap) \
--with-sg-config=/etc/squidGuard/squidGuard.conf \
--with-sg-logdir=/var/log/squidGuard \
|| die "configure has failed"
emake || die "make has failed"
}
src_install() {
emake prefix="/usr" INSTDIR="${D}" install || die "emake install has failed"
keepdir /var/log/squidGuard
fowners squid:squid /var/log/squidGuard
insinto /etc/squidGuard/sample
doins "${FILESDIR}"/squidGuard.conf.*
insinto /etc/squidGuard/sample/db
doins "${FILESDIR}"/blockedsites
dodoc ANNOUNCE CHANGELOG README
dohtml doc/*.html
docinto text
dodoc doc/*.txt
}
pkg_postinst() {
einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
einfo " url_rewrite_program /usr/bin/squidGuard"
einfo " url_rewrite_children 10"
einfo ""
einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
einfo "Examples can be found in /etc/squidGuard/sample/"
}
|