]> Pileus Git - ~andy/sunrise/blob - net-misc/iplist/iplist-0.25-r1.ebuild
net-misc/wolman: Fix qt deps
[~andy/sunrise] / net-misc / iplist / iplist-0.25-r1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils linux-info
6
7 DESCRIPTION="Blocks connections from/to hosts listed in files using iptables."
8 HOMEPAGE="http://iplist.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64"
14 IUSE="java"
15
16 DEPEND="net-firewall/iptables
17         net-libs/libnetfilter_queue
18         net-libs/libnfnetlink
19         sys-libs/zlib"
20 RDEPEND="java? ( >=virtual/jre-1.5 )
21         ${DEPEND}"
22 CONFIG_CHECK="NETFILTER_XT_MATCH_IPRANGE"
23
24 src_unpack() {
25         unpack ${A}
26         cd "${S}"
27
28         epatch "${FILESDIR}"/${PN}-makefile.patch
29         epatch "${FILESDIR}"/${P}-init.patch
30 }
31
32 src_install() {
33         if use java ; then
34                 insinto "/usr/share/${PN}"
35                 doins ipblockUI.jar || die "gui install failed"
36         fi
37         emake DESTDIR="${D}" install || die "install failed!"
38         doman {${PN},ipblock}.8 || die "doman failed!"
39         exeinto /etc/cron.daily
40         newexe debian/ipblock.cron.daily ipblock || die "cron failed"
41 }
42
43 pkg_postinst() {
44         einfo "a cron file was set in /etc/cron.daily"
45         einfo "and it will update your lists once a day"
46 }