summaryrefslogtreecommitdiff
blob: e9fb01834cd0fc48aeb0fe20af67a8e80a6f5988 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils toolchain-funcs

MY_P=${P/mob/MoB}

DESCRIPTION="A linux console application that blocks connections from/to hosts listed in a file in peerguardian format using iptables."
HOMEPAGE="http://moblock.berlios.de/"
SRC_URI="http://download.berlios.de/${PN}/${MY_P}-i586.tar.bz2"

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

DEPEND=">=net-libs/libnetfilter_queue-0.0.11
		>=net-libs/libnfnetlink-0.0.14"
RDEPEND="${DEPEND}"

S=${WORKDIR}/${MY_P}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}-makefile.patch"
}

src_compile() {
	emake CC=$(tc-getCC) || die "emake failed"
}

src_install() {
	dosbin moblock
	newconfd "${FILESDIR}/confd" moblock
	newinitd "${FILESDIR}/initd" moblock
	dodir /etc/moblock
	touch "${D}/etc/moblock/p2p.p2b"
	dodir /var/log
	touch "${D}/var/log/moblock.log"
	dodoc Changelog README
}