]> Pileus Git - ~andy/sunrise/blob - app-admin/blockhosts/blockhosts-2.0.4.ebuild
app-admin/blockhosts: Version bump, drop old
[~andy/sunrise] / app-admin / blockhosts / blockhosts-2.0.4.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 NEED_PYTHON=2.3
6
7 inherit distutils
8
9 MY_P="BlockHosts-${PV}"
10 DESCRIPTION="Blocks abusive IP hosts which probe your services (such as sshd, proftpd)"
11 HOMEPAGE="http://www.aczoom.com/cms/blockhosts/"
12 SRC_URI="http://www.aczoom.com/tools/blockhosts/${MY_P}.tar.gz"
13
14 LICENSE="public-domain"
15 SLOT="0"
16 KEYWORDS="~x86"
17 IUSE="logrotate"
18
19 DEPEND=""
20 RDEPEND="logrotate? ( app-admin/logrotate )"
21
22 DOCS="CHANGES"
23 S=${WORKDIR}/${MY_P}
24
25 src_unpack() {
26         unpack ${A}
27         cd "${S}"
28
29         # don't let setup.py install bhrss.py to /usr/bin
30         sed -i \
31                 -e "s/,.*bhrss\.py'//" \
32                 setup.py || die "sed failed"
33
34         # remove logrotate check if not in IUSE
35         if ! use logrotate; then
36                 sed -i \
37                         -e "/^if/d" \
38                         -e "/DATA_FILES\./d" \
39                         setup.py || die "sed failed"
40         fi
41 }
42
43 src_install() {
44         distutils_src_install
45
46         insinto /usr/share/${PN}
47         doins bhrss.py
48
49         dohtml *.html
50 }
51
52 pkg_postinst() {
53         echo
54         elog "This package isn't configured properly."
55         elog "Please refer to the homepage to do this!"
56         echo
57         elog "See also: http://gentoo-wiki.com/HOWTO_BlockHosts"
58         echo
59         elog "bhrss.py cgi-script is in /usr/share/${PN}."
60         elog "If you want to use it, put it in your cgi-bin,"
61         elog "emerge dev-python/pyxml and copy blockhosts.py"
62         elog "into your python module directory."
63         echo
64 }