# Description: Bans IPs after too many failed authentication attempts # URL: https://www.fail2ban.org/ # Maintainer: protonesso, nagakamira at gmail dot com # Depends on: python-setuptools iptables # Section: security name=fail2ban version=0.11.2 release=1 backup=('etc/fail2ban/fail2ban.conf' 'etc/fail2ban/jail.conf' 'etc/logrotate.d/fail2ban') source=("https://github.com/fail2ban/fail2ban/archive/$version.tar.gz::archive=$name-$version.tar.gz") build() { cd "$SRC"/$name-$version sed -i 's|self.install_dir|"/usr/bin"|' setup.py ./fail2ban-2to3 python3 setup.py build python3 setup.py install --prefix=/usr --root="$PKG" --optimize=1 sed -i 's/sbin/bin/g' "$PKG"/etc/fail2ban/action.d/sendmail*.conf install -Dm644 build/fail2ban.service "$PKG"/usr/lib/systemd/system/fail2ban.service install -Dm644 files/fail2ban-tmpfiles.conf "$PKG"/usr/lib/tmpfiles.d/fail2ban.conf install -Dm644 files/fail2ban-logrotate "$PKG"/etc/logrotate.d/fail2ban install -Dm644 files/bash-completion "$PKG"/usr/share/bash-completion/completions/fail2ban rm -rf "$PKG"/run }