summaryrefslogtreecommitdiff
blob: 0d47e4cd78f368c73190d2469fe446be0b0fd793 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ufdbguard-1.13.ebuild,v 1.1 2007/10/23 12:32:19 bass Exp $

inherit eutils
DESCRIPTION="ufdbGuard is a redirector for the Squid internet proxy."
HOMEPAGE="http://ufdbguard.sf.net"
SRC_URI="mirror://sourceforge/ufdbguard/ufdbGuard-${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

DEPEND="dev-libs/openssl
		app-arch/bzip2
		dev-util/yacc
		sys-devel/flex"
RDEPEND="${DEPEND}
		net-misc/wget
		net-proxy/squid"

S="${WORKDIR}/ufdbGuard-${PV}"

src_compile() {
	#econf || die "econf failed"
	./configure \
		--host=${CHOST} \
		--prefix=/usr \
		--with-ufdb-config=/etc/ufdbguard \
		--with-ufdb-logdir=/var/log/ufdbguard \
		--with-ufdb-dbhome=/etc/ufdbguard/blacklists \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man || die "./configure failed"

	emake || die "emake failed"
}

src_install() {
	dodoc CHANGELOG INSTALL README README.multithreaded TODO
	dodoc doc/*.html doc/*.txt src/UFDB
	dohtml doc/*.html

	dobin src/ufdbGenTable src/ufdbGuard src/mtserver/ufdbgclient src/mtserver/ufdbguardd src/ufdbGrab

	dodir /etc/ufdbguard/blacklists
	insinto /etc/ufdbguard
	doins src/ufdbGuard.conf

	newconfd ${FILESDIR}/ufdbguard.confd ufdbguard
	newinitd ${FILESDIR}/ufdbguard.initd ufdbguard

}

pkg_postinst() {
	einfo "Add ufdbguard port to services:"
	einfo 'echo "ufdbguardd      3977/tcp" >> /etc/services '
	echo ""
	ewarn "This version require a rebuild of binary list using ufdbGentable"
	ewarn "and maybe some change in the conf file. Read the doc for more info."
}