contrib/fail2ban/Pkgfile

34 lines
1013 B
Plaintext
Raw Normal View History

2020-05-21 15:56:20 +02:00
# Description: Bans IP that makes too many password failures.
# URL: http://www.fail2ban.org/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: python python3-setuptools
2020-05-21 15:56:20 +02:00
name=fail2ban
2020-11-24 08:32:14 +01:00
version=0.11.2
release=3
2020-05-21 15:56:20 +02:00
source=(https://github.com/fail2ban/$name/archive/$version/$name-$version.tar.gz
fail2ban.rc paths-crux.conf
fail2ban-0.11.2_CVE-2021-32749.patch
gh-3020.patch
2to3.patch)
2020-05-21 15:56:20 +02:00
build() {
cd $name-$version
patch -Np1 -i $SRC/fail2ban-0.11.2_CVE-2021-32749.patch
patch -Np1 -i $SRC/2to3.patch
patch -Np1 -i $SRC/gh-3020.patch
2020-05-21 15:56:20 +02:00
./fail2ban-2to3
2020-11-03 18:55:17 +01:00
/usr/bin/python3 setup.py build
/usr/bin/python3 setup.py install --root=$PKG --prefix=/usr --skip-build
/usr/bin/python3 -mcompileall $PKG
2020-05-21 15:56:20 +02:00
install -Dm750 $SRC/fail2ban.rc $PKG/etc/rc.d/fail2ban
install -Dm664 $SRC/paths-crux.conf $PKG/etc/fail2ban/paths-crux.conf
find $PKG -iname "*README*" -exec rm '{}' \+
rm -r $PKG/etc/fail2ban/paths-{arch,debian,fedora,freebsd,opensuse,osx}.conf
2020-05-21 15:56:20 +02:00
rm -r $PKG/usr/share/doc
}