1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs linux-info
11 DESCRIPTION="Blocks connections from/to hosts listed in a file in peerguardian format using iptables."
12 HOMEPAGE="http://moblock.berlios.de/"
13 SRC_URI="mirror://berlios/${PN}/${MY_P}-i586.tar.bz2"
18 DEPEND=">=net-libs/libnetfilter_queue-0.0.11
19 >=net-libs/libnfnetlink-0.0.14
20 net-firewall/iptables"
25 CONFIG_CHECK="NETFILTER NETFILTER_XTABLES NETFILTER_XT_TARGET_NFQUEUE IP_NF_IPTABLES IP_NF_FILTER"
30 epatch "${FILESDIR}/${P}-makefile.patch"
34 emake CC=$(tc-getCC) || die "emake failed"
39 dosbin "${FILESDIR}/${PVR}/moblock-update"
40 dosbin "${FILESDIR}/${PVR}/moblock-stats"
42 newconfd "${FILESDIR}/${PVR}/confd" moblock
43 newinitd "${FILESDIR}/${PVR}/initd" moblock
46 touch "${D}/var/db/moblock/guarding.p2p"
48 keepdir /var/cache/moblock
50 dodoc Changelog README
54 elog "Run moblock-update to update your block list."
55 elog "You can set moblock to update daily with the command"
56 elog " ln -s /usr/sbin/moblock-update /etc/cron.daily/moblock-update"
58 elog " ln -s /usr/sbin/moblock-update /etc/cron.weekly/moblock-update"
62 if ! has_version ${CATEGORY}/${PN} && [[ -d ${ROOT}/var/cache/moblock ]] ; then
63 einfo "Removing leftover cache..."
64 rm -rf "${ROOT}"/var/cache/moblock