summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2010-07-29 15:20:03 +0000
committerMichael Weber <xmw@gentoo.org>2010-07-29 15:20:03 +0000
commit8b55532158da4ee0b43497af39d44357b1c10f44 (patch)
tree74b2b0bd123a38d281e17f5047e536ac81b3de12 /app-admin
parentdev-python/ncrypt: Usage doc added (diff)
downloadsunrise-8b55532158da4ee0b43497af39d44357b1c10f44.tar.gz
sunrise-8b55532158da4ee0b43497af39d44357b1c10f44.tar.bz2
sunrise-8b55532158da4ee0b43497af39d44357b1c10f44.zip
app-admin/blockhosts: New upstream release, thanks to John C. Mozingo for the hint. Python3 stuff added, thanks to jbergstroem for the peer-review
svn path=/sunrise/; revision=11057
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/blockhosts/ChangeLog7
-rw-r--r--app-admin/blockhosts/Manifest6
-rw-r--r--app-admin/blockhosts/blockhosts-2.4.0.ebuild (renamed from app-admin/blockhosts/blockhosts-2.2.0.ebuild)66
3 files changed, 47 insertions, 32 deletions
diff --git a/app-admin/blockhosts/ChangeLog b/app-admin/blockhosts/ChangeLog
index cd839e428..96071bef5 100644
--- a/app-admin/blockhosts/ChangeLog
+++ b/app-admin/blockhosts/ChangeLog
@@ -1,7 +1,12 @@
# ChangeLog for app-admin/blockhosts
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 29 Jul 2010; Michael Weber (xmw) <gentoo@xmw.de> -blockhosts-2.2.0.ebuild,
+ +blockhosts-2.4.0.ebuild:
+ New upstream release, thanks to John C. Mozingo for the hint. Python3 stuff
+ added, thanks to jbergstroem for the peer-review
+
22 Aug 2008; Thomas Beierlein (TomJBE) <tb@forth-ev.de> metadata.xml:
Added USE flag description wrt GLEP 56
diff --git a/app-admin/blockhosts/Manifest b/app-admin/blockhosts/Manifest
index d35d215e8..5e0636567 100644
--- a/app-admin/blockhosts/Manifest
+++ b/app-admin/blockhosts/Manifest
@@ -1,4 +1,4 @@
-DIST BlockHosts-2.2.0.tar.gz 55126 RMD160 b540d9368dd781efb351098c02f0278819feccd7 SHA1 781f0676e27543f720475e2e1b84c0d1222c8433 SHA256 93f2a0fcceef89c5e2c8317e2c5be4a225119647dfe33d49ce620dd566787972
-EBUILD blockhosts-2.2.0.ebuild 1622 RMD160 8a1b28f67cba000500d33544eacfea9d46d6ad9a SHA1 498149c047b287727736959ff87fbead8569e5ec SHA256 b9ef684be74d5e516e5015001853ee190627cd21e2a60d732d082d3526f80418
-MISC ChangeLog 2043 RMD160 e2c8cba5b0b3cda19f7c3f14a6f8d8e8d0e8e290 SHA1 410ae28088793a4891f0710047ad6384aad37c37 SHA256 0fde2da0059e9e99234a83ad7d1d6f50e98dacc9a2d7763623240a97559cb286
+DIST BlockHosts-2.4.0.tar.gz 57467 RMD160 4d3c55e5d909dc045fdf40a775a256b1a0741978 SHA1 c1cb468fbd01887ddc22f41554a63b0f41f120ae SHA256 cf12d4d77edbb09ddb226699d54e86f56f8e3f5f7a53e39b3b7dfbd2e3277e57
+EBUILD blockhosts-2.4.0.ebuild 1801 RMD160 72c9a46699348c24109f90ee9003b38a7636bd21 SHA1 4f0c063d5b3a2e6c798d30e8ca9938fd878c2278 SHA256 a33e9021499b6b04aff18fc414fb3da19b6ddf35ff152b8536649a2b584b4264
+MISC ChangeLog 2278 RMD160 1b30437b97dae882855190d48b0dd07c0c951076 SHA1 34c46cf7b8586ade72588ac3c6f8629e0ac2d980 SHA256 e9330356bc04d1063f740f1f605fa71e70f902cba63b8daba418f5be3a5af5dd
MISC metadata.xml 379 RMD160 7ed91964b8045b7ca6cc5c39acf488da92975a7d SHA1 4b9e3ae1ab6b4f4e3fec66cd19a6e2cafa8d8d53 SHA256 2a19ee5cafdfe60a03461ab8ea7bfa945081bd03f1a002d4732e81ec37282d94
diff --git a/app-admin/blockhosts/blockhosts-2.2.0.ebuild b/app-admin/blockhosts/blockhosts-2.4.0.ebuild
index dcd8b6d13..d0dcc4551 100644
--- a/app-admin/blockhosts/blockhosts-2.2.0.ebuild
+++ b/app-admin/blockhosts/blockhosts-2.4.0.ebuild
@@ -2,62 +2,74 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-NEED_PYTHON=2.3
+EAPI=2
-inherit distutils
+PYTHON_DEPEND="2"
+
+inherit python distutils
MY_P="BlockHosts-${PV}"
DESCRIPTION="Blocks abusive IP hosts which probe your services (such as sshd, proftpd)"
HOMEPAGE="http://www.aczoom.com/cms/blockhosts/"
-SRC_URI="http://www.aczoom.com/tools/blockhosts/${MY_P}.tar.gz"
+SRC_URI="http://www.aczoom.com/tools/${PN}/${MY_P}.tar.gz"
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="~x86"
-IUSE="logrotate logwatch"
+KEYWORDS="~amd64 ~x86"
+IUSE="logrotate logwatch test"
-DEPEND=""
-RDEPEND="logrotate? ( app-admin/logrotate )"
+DEPEND="dev-python/pyxml"
+RDEPEND="${DEPEND}
+ logrotate? ( app-admin/logrotate )"
-DOCS="CHANGES"
S=${WORKDIR}/${MY_P}
-src_unpack() {
- unpack ${A}
- cd "${S}"
+pkg_setup() {
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
# don't let setup.py install bhrss.py to /usr/bin
- sed -i \
- -e "s/,.*bhrss\.py'//" \
- setup.py || die "sed failed"
+ sed -i -e "s/,.*bhrss\.py'//" setup.py || die
# remove logrotate check if not in IUSE
if ! use logrotate; then
- sed -i \
- -e "/^if/d" \
- -e "/DATA_FILES\./d" \
- setup.py || die "sed failed"
+ sed -i -e "/^if/d ; /DATA_FILES\./d" setup.py || die
fi
+
+ distutils_src_prepare
+}
+
+src_test() {
+ $(PYTHON) test_blockhosts.py || die
}
src_install() {
distutils_src_install
- insinto /usr/share/${PN}
- doins bhrss.py
- # keep the test script
- doins test_blockhosts.py
+ exeinto $(python_get_sitedir)
+ doexe ${PN}.py || die
+
+ dosym $(python_get_sitedir)/${PN}.py /usr/bin/${PN}.py || die
- dohtml *.html
+ exeinto /usr/share/${PN}
+ doexe bhrss.py || die
+
+ # keep the test script
+ use test && { doins test_blockhosts.py || die ; }
# not tested, but should work
if use logwatch; then
insinto /etc/log.d/conf/services/
- doins logwatch/blockhosts.conf
+ doins logwatch/blockhosts.conf || die
exeinto /etc/log.d/scripts/services/
- doexe logwatch/blockhosts
+ doexe logwatch/blockhosts || die
fi
+
+ dohtml *.html || die
}
pkg_postinst() {
@@ -65,11 +77,9 @@ pkg_postinst() {
elog "This package isn't configured properly."
elog "Please refer to the homepage to do this!"
echo
- elog "See also: http://gentoo-wiki.com/HOWTO_BlockHosts"
+ elog "See also: http://www.gentoo-wiki.info/BlockHosts"
echo
elog "bhrss.py cgi-script is in /usr/share/${PN}."
elog "If you want to use it, put it in your cgi-bin,"
- elog "emerge dev-python/pyxml and copy blockhosts.py"
- elog "into your python module directory."
echo
}