# AndrzejL pkgname=fail2ban-git _pkgname=fail2ban pkgver=0.9.2.r132.gc37009a pkgrel=1 pkgdesc='Bans IPs after too many failed authentication attempts' url="http://www.fail2ban.org/" license=('GPL') arch=('any') depends=('python' 'iptables' 'python-pyinotify' 'whois' 'sqlite' 'git') conflicts=('fail2ban') backup=('etc/fail2ban/fail2ban.conf' 'etc/fail2ban/jail.conf') install=fail2ban.install #source=(https://github.com/fail2ban/$pkgname/archive/$pkgver.tar.gz) source=($pkgname'::git+https://github.com/fail2ban/fail2ban.git') sha512sums=('SKIP') pkgver() { cd "$srcdir/$pkgname" git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' } package() { cd "$srcdir/$pkgname" python setup.py install --prefix /usr --root "$pkgdir" --optimize=1 install -Dm644 files/fail2ban.service \ "$pkgdir"/usr/lib/systemd/system/$pkgname.service install -Dm644 files/fail2ban-tmpfiles.conf \ "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf install -Dm644 files/fail2ban-logrotate \ "$pkgdir"/etc/logrotate.d/fail2ban install -Dm644 files/bash-completion \ "$pkgdir"/usr/share/bash-completion/completions/fail2ban # fix sendmail location sed -i 's/sbin/bin/g' "$pkgdir"/etc/fail2ban/action.d/sendmail*.conf install -Dm644 man/fail2ban.1 "$pkgdir"/usr/share/man/man1/fail2ban.1 install -Dm644 man/fail2ban-client.1 \ "$pkgdir"/usr/share/man/man1/fail2ban-client.1 install -Dm644 man/fail2ban-regex.1 \ "$pkgdir"/usr/share/man/man1/fail2ban-regex.1 install -Dm644 man/fail2ban-server.1 \ "$pkgdir"/usr/share/man/man1/fail2ban-server.1 install -Dm644 man/jail.conf.5 "$pkgdir"/usr/share/man/man5/jail.conf.5 }