summaryrefslogtreecommitdiff
blob: 86921835c0f314e08a4c7077d0d4b4f3b3a4b305 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/bfilter/bfilter-1.1.4-r1.ebuild,v 1.1 2009/10/19 22:29:22 mrness Exp $

EAPI=2

inherit eutils autotools

DESCRIPTION="An ad-filtering web proxy featuring an effective heuristic ad-detection algorithm"
HOMEPAGE="http://bfilter.sourceforge.net/"
SRC_URI="mirror://sourceforge/bfilter/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 sparc x86"
IUSE="X debug"

RDEPEND="sys-libs/zlib
	dev-libs/ace
	dev-libs/libsigc++:2
	X? ( >=dev-cpp/gtkmm-2.4 )
	dev-libs/boost"
DEPEND="${RDEPEND}
	dev-util/scons
	dev-util/pkgconfig"

RESTRICT="test" # boost's test API has changed

src_prepare() {
	epatch "${FILESDIR}"/${P}-external-boost.patch
	rm -rf "${S}"/boost
	eautoreconf
}

src_configure() {
	econf \
		$(use_enable debug) \
		$(use_with X gui) \
		--without-builtin-boost || die "econf failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "make install failed"
	insinto /etc/bfilter
	doins "${FILESDIR}"/forwarding.xml

	dodoc AUTHORS ChangeLog "${FILESDIR}"/forwarding-proxy.xml
	dohtml doc/*

	newinitd "${FILESDIR}/bfilter.init" bfilter
	newconfd "${FILESDIR}/bfilter.conf" bfilter
}

pkg_preinst() {
	enewgroup bfilter
	enewuser bfilter -1 -1 -1 bfilter
}

pkg_postinst() {
	elog "The documentation is available at"
	elog "   http://bfilter.sourceforge.net/documentation.php"
	elog "For forwarding bfilter service traffic through a proxy,"
	elog "see forwarding-proxy.xml example installed in the doc directory."
}