contrib/denyhosts/Pkgfile

35 lines
1020 B
Plaintext
Raw Normal View History

# Description: DenyHosts is a script intended to be run by Linux system administrators to help thwart ssh server attacks.
2014-11-21 12:32:14 +01:00
# URL: http://denyhost.sourceforge.net/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
# Packager: Danny Rawlins, crux at romster dot me
# Depends on: python
name=denyhosts
2014-11-21 12:32:14 +01:00
version=2.9
release=1
source=(http://downloads.sourceforge.net/project/denyhost/denyhost-$version/$name-$version.tar.gz)
build() {
cd DenyHosts-$version
2014-04-21 17:15:44 +02:00
/usr/bin/python setup.py install --root=$PKG
2014-11-21 12:32:14 +01:00
install -d $PKG/etc/{denyhosts,rc.d} $PKG/usr/sbin
2014-11-21 12:32:14 +01:00
mv $PKG/etc/denyhosts.conf \
$PKG/etc/denyhosts/denyhosts.conf
2014-11-21 12:32:14 +01:00
mv $PKG/usr/bin/daemon-control-dist \
$PKG/etc/rc.d/denyhosts
2014-11-21 12:32:14 +01:00
mv $PKG/usr/bin/denyhosts.py $PKG/usr/sbin/denyhosts
mv $PKG/usr/share/man $PKG/usr/man
rmdir $PKG/usr/share $PKG/usr/bin
sed -i \
-e 's|^DENYHOSTS_LOCK = .*|DENYHOSTS_LOCK = "/var/run/denyhosts.pid"|' \
-e 's|^DENYHOSTS_CFG = .*|DENYHOSTS_CFG = "/etc/denyhosts/denyhosts.conf"|' \
$PKG/etc/rc.d/denyhosts
}