smlinux/net/fail2ban/fail2ban.SMBuild

43 lines
No EOL
1.3 KiB
Text
Executable file

app=fail2ban
version=0.10.4
build=1sml
homepage="http://www.fail2ban.org/wiki/index.php/Main_Page"
download="https://github.com/fail2ban/fail2ban/archive/refs/tags/0.10.4.tar.gz"
desc="Log-based intrusion detection and prevention system written in Python"
requires="python3"
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
sh fail2ban-2to3
python setup.py install --prefix="" --root=$pkg
# move config files to .new
( cd $pkg/etc/fail2ban
for file in $(find . -type f); do
mv $file "$file.new"
done
)
( cd $pkg/etc/fail2ban ; patch -p0 < $srcdir/jail.conf.patch )
install -D -m 0644 $srcdir/rc.fail2ban $pkg/etc/rc.d/rc.fail2ban.new
install -D -m 0644 $srcdir/paths-smlinux.conf $pkg/etc/fail2ban/paths-smlinux.conf.new
rm -f $pkg/etc/fail2ban/paths-{arch,debian,fedora,freebsd,osx,opensuse}.conf.new
mkdir -p $pkg/var/{run,lib/fail2ban}
mv $pkg/usr/share/doc/$app/* $pkgdocs/
rm -r $pkg/usr
mkfinalpkg
}
sha512sums="
7f07659c3d694cc5fa52a17aca20447f021766520e5234d3775edc0d51e5ff00507da3c76591b741d46b2452b3b9f14933802b9965fd6a9c7050cbacaa64cebb fail2ban-0.10.4.tar.lz
89c6e4bbb1a01f3f7601372bbd49d72dd6a17a58503cce30f754110cdc8b55fc80dfa21b5e97a16525bd80c7cae961af5024e5cca45d922245eeefa83cb54ef2 jail.conf.patch
"