1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Pierre Schmitz <pierre@archlinux.de>
8 pkgdesc='Checks machines for the presence of rootkits and other unwanted tools.'
10 url='http://rkhunter.sourceforge.net/'
12 depends=('bash' 'perl' 'wget')
14 backup=('etc/rkhunter.conf')
15 source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc})
16 md5sums=('35bf1e2850343a4768e34a3fc260b8a1'
18 sha256sums=('f750aa3e22f839b637a073647510d7aa3adf7496e21f3c875b7a368c71d37487'
20 validpgpkeys=('9713808A269FA0326356958BE9C5DC50D13AAA83') # John Horne
23 cd "${srcdir}/${pkgname}-${pkgver}"
25 # fix installer for x86_64
26 sed -i -e "s/lib64/lib/g" installer.sh
29 install -dm0755 "${pkgdir}/usr"
30 ./installer.sh --layout custom "${pkgdir}/usr" --striproot "${pkgdir}" --install
33 mv "${pkgdir}/usr/etc" "${pkgdir}"
34 mv "${pkgdir}/usr/var" "${pkgdir}"
36 sed -i -e "s#/usr/etc/rkhunter.conf#/etc/rkhunter.conf#g" "${pkgdir}/usr/bin/${pkgname}"
37 sed -i -e "s#/usr/etc/rkhunter.conf#/etc/rkhunter.conf#g" "${pkgdir}/etc/${pkgname}.conf"
38 sed -i -e "s#/usr/var/lib/rkhunter/db#/var/lib/rkhunter/db#g" "${pkgdir}/etc/${pkgname}.conf"
39 sed -i -e "s#/usr/var/lib/rkhunter/tmp#/var/lib/rkhunter/tmp#g" "${pkgdir}/etc/${pkgname}.conf"
42 rm -f "${pkgdir}/var/lib/${pkgname}/tmp/"{group,passwd}
45 sed -i 's|^#ALLOWHIDDENDIR=/dev/.udev$|ALLOWHIDDENDIR=/dev/.udev|' \
46 "${pkgdir}/etc/${pkgname}.conf"