]> Pileus Git - ~andy/sunrise/blob - net-misc/blocksshd/blocksshd-1.1.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update header
[~andy/sunrise] / net-misc / blocksshd / blocksshd-1.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="Protects computers from SSH brute force attacks by dynamically blocking IP addresses over iptables"
8 HOMEPAGE="http://sourceforge.net/projects/blocksshd/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13
14 KEYWORDS="~x86"
15 IUSE=""
16
17 DEPEND=""
18 RDEPEND=">=virtual/perl-Sys-Syslog-0.16
19         >=dev-perl/Sys-Hostname-Long-1.2
20         >=dev-perl/File-Tail-0.99.1
21         >=dev-perl/Net-DNS-0.53-r1
22         >=dev-perl/Net-Subnets-0.21
23         >=virtual/perl-Getopt-Long-2.34
24         >=net-firewall/iptables-1.3.5-r1"
25
26 src_unpack() {
27         unpack ${A}
28         cd "${S}"
29
30         # convert CRLF to LF
31         edos2unix blocksshd blocksshd.conf
32
33         #apply patches
34         epatch "${FILESDIR}"/${P}.conf-dir-change.patch
35         epatch "${FILESDIR}"/${P}.etc-dir-change.patch
36 }
37
38 src_install() {
39         dosbin blocksshd || die "dosbin failed"
40         dodoc CHANGELOG CREDITS README VERSION blocksshd.conf
41
42         newinitd "${FILESDIR}"/blocksshd.init blocksshd
43
44         insinto /etc/blocksshd
45         newins blocksshd.conf blocksshd.conf.sample
46 }
47
48 pkg_postinst() {
49         ewarn
50         ewarn "The configuration file ${ROOT}etc/blocksshd/blocksshd.conf.sample"
51         ewarn "must be renamed before blocksshd will run."
52         ewarn "Please review this configuration file for settings that might"
53         ewarn "be appropiate for your setup."
54         ewarn
55 }