archrelease: copy trunk to community-any
[ArchLinux/community.git] / rkhunter / repos / community-any / PKGBUILD
blob3dcfdd35aaeaa3c9fc446809189dc67ab871c70d
1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Pierre Schmitz <pierre@archlinux.de>
5 pkgname=rkhunter
6 pkgver=1.4.6
7 pkgrel=3
8 pkgdesc='Checks machines for the presence of rootkits and other unwanted tools.'
9 arch=('any')
10 url='http://rkhunter.sourceforge.net/'
11 license=('GPL')
12 depends=('bash' 'perl' 'wget')
13 optdepends=('unhide')
14 backup=('etc/rkhunter.conf')
15 source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc})
16 md5sums=('35bf1e2850343a4768e34a3fc260b8a1'
17          'SKIP')
18 sha256sums=('f750aa3e22f839b637a073647510d7aa3adf7496e21f3c875b7a368c71d37487'
19             'SKIP')
20 validpgpkeys=('9713808A269FA0326356958BE9C5DC50D13AAA83')  # John Horne
22 package() {
23   cd "${srcdir}/${pkgname}-${pkgver}"
25   # fix installer for x86_64
26   sed -i -e "s/lib64/lib/g" installer.sh
28   # install to "/usr"
29   install -dm0755 "${pkgdir}/usr"
30   ./installer.sh --layout custom "${pkgdir}/usr" --striproot "${pkgdir}" --install
32   # fix paths
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"
41   # cleanup
42   rm -f "${pkgdir}/var/lib/${pkgname}/tmp/"{group,passwd}
44   # we trust in udev
45   sed -i 's|^#ALLOWHIDDENDIR=/dev/.udev$|ALLOWHIDDENDIR=/dev/.udev|' \
46     "${pkgdir}/etc/${pkgname}.conf"