desktop/rkhunter/PKGBUILD
2012-05-07 16:31:44 +00:00

50 lines
1.7 KiB
Bash

#
# Apps Packages for Chakra, part of chakra-project.org
#
# Original Arch Linux Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Original Arch Linux Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Original Arch Linux Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=rkhunter
pkgver=1.4.0
pkgrel=1
pkgdesc='Checks machines for the presence of rootkits and other unwanted tools.'
arch=('any')
url='http://rkhunter.sourceforge.net/'
license=('GPL')
depends=('bash' 'perl' 'wget')
optdepends=('unhide')
backup=('etc/rkhunter.conf')
categories=('system')
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz")
md5sums=('37b1ceb79a5ff3debca335d6550ac6b0')
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
# fix installer for x86_64
sed -i -e "s/lib64/lib/g" installer.sh
# install to "/usr"
install -dm0755 "${pkgdir}/usr"
./installer.sh --layout custom "${pkgdir}/usr" --striproot "${pkgdir}" --install
# fix paths
mv "${pkgdir}/usr/etc" "${pkgdir}"
mv "${pkgdir}/usr/var" "${pkgdir}"
sed -i -e "s#/usr/etc/rkhunter.conf#/etc/rkhunter.conf#g" "${pkgdir}/usr/bin/${pkgname}"
sed -i -e "s#/usr/etc/rkhunter.conf#/etc/rkhunter.conf#g" "${pkgdir}/etc/${pkgname}.conf"
sed -i -e "s#/usr/var/lib/rkhunter/db#/var/lib/rkhunter/db#g" "${pkgdir}/etc/${pkgname}.conf"
sed -i -e "s#/usr/var/lib/rkhunter/tmp#/var/lib/rkhunter/tmp#g" "${pkgdir}/etc/${pkgname}.conf"
# cleanup
rm -f "${pkgdir}/var/lib/${pkgname}/tmp/"{group,passwd}
# we trust in udev
sed -i 's|^#ALLOWHIDDENDIR=/dev/.udev$|ALLOWHIDDENDIR=/dev/.udev|' \
"${pkgdir}/etc/${pkgname}.conf"
}
# vim:set ts=2 sw=2 et: