diff options
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-99999999.ebuild | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild b/net-analyzer/fail2ban/fail2ban-99999999.ebuild index ee2f56e3283f..8372daa6a927 100644 --- a/net-analyzer/fail2ban/fail2ban-99999999.ebuild +++ b/net-analyzer/fail2ban/fail2ban-99999999.ebuild @@ -1,24 +1,26 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 -PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} pypy ) DISTUTILS_SINGLE_IMPL=1 -inherit distutils-r1 eutils git-r3 systemd vcs-snapshot +inherit distutils-r1 eutils systemd git-r3 DESCRIPTION="scans log files and bans IPs that show malicious signs" HOMEPAGE="http://www.fail2ban.org/" -EGIT_REPO_URI="https://github.com/${PN}/${PN}/" +EGIT_REPO_URI="https://github.com/${PN}/${PN}" LICENSE="GPL-2" SLOT="0" KEYWORDS="" IUSE="selinux systemd" +# TODO support ipfw and ipfilter RDEPEND=" - net-firewall/iptables + kernel_linux? ( net-firewall/iptables ) + kernel_FreeBSD? ( sys-freebsd/freebsd-pf ) net-misc/whois virtual/logger virtual/mta @@ -29,33 +31,26 @@ RDEPEND=" )' 'python*' ) ) " -DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) +REQUIRED_USE="systemd? ( !python_single_target_pypy )" -src_unpack() { - git-r3_src_unpack -} +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) -src_prepare() { +python_prepare_all() { # Replace /var/run with /run, but not in the top source directory - sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die + find . -mindepth 2 -type f -exec \ + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die - # Fix bashisms and do not direct useful output to /dev/null (bug #536320) - # Remove global logrotate settings (bug #549856) - epatch \ - "${FILESDIR}"/${PN}-0.9.2-initd.patch \ - "${FILESDIR}"/${PN}-0.9.2-logrotate.patch - - distutils-r1_src_prepare + distutils-r1_python_prepare_all } python_test() { - ${EPYTHON} bin/${PN}-testcases + "${PYTHON}" "bin/${PN}-testcases" || die "tests failed with ${EPYTHON}" } -src_install() { - distutils-r1_src_install +python_install_all() { + distutils-r1_python_install_all - rm -rf "${D}"/usr/share/doc/${PN} + rm -r "${D}"/usr/share/doc/${PN} "${D}"/run || die # not FILESDIR newconfd files/gentoo-confd ${PN} @@ -98,7 +93,6 @@ pkg_postinst() { elog "If you want to use ${PN}'s persistent database, then reinstall" elog "dev-lang/python with USE=sqlite" fi - if has_version sys-apps/systemd[-python]; then elog "If you want to track logins through sys-apps/systemd's" elog "journal backend, then reinstall sys-apps/systemd with USE=python" |