# Maintainer: AlphaJack # Contributor Bjoern Franke # Contributor: G. Schlisio # Contributor: Matt Harrison # Contributor: Sergey Mamonov pkgname="maldet" pkgver=1.6.5 pkgrel=2 pkgdesc="Linux malware scanner designed around threats faced in shared host environments" url="https://www.rfxn.com/projects/linux-malware-detect/" license=("GPL2") arch=("any") provides=("linux-malware-detect") depends=("ed" "inetutils" "inotify-tools" "perl" "systemd") source=("https://github.com/rfxn/linux-malware-detect/archive/$pkgver.tar.gz" "maldet-update-signatures.service" "maldet-update-signatures.timer") backup=("etc/maldet/hookscan.conf" "etc/maldet/ignore_file_ext" "etc/maldet/ignore_inotify" "etc/maldet/ignore_paths" "etc/maldet/ignore_sigs" "etc/maldet/internals.conf" "etc/maldet/maldet.conf" "etc/maldet/monitor_paths" ) sha256sums=('23c7cf5649b0f1c1d4e2ab78961eb58453ed01aeffb53926fde6f2baa7f61e68' '172486c33905df4032d74dd7f79c6dafce64df2006a037fba3c6aded99eaaba1' '0d6d61dadb72eec8ded0d7e97d4b723fd2e4323e68852add59d372ef3f4e7b00') install="maldet.install" prepare(){ ## TODO upstream setup tries to overwrite clamav's rfxn.* and lmd.user.* files # seems to run with root-privs, so check for overwrites anywhere (best in a VM) # file system privileges - depends on root/user cd "linux-malware-detect-$pkgver" # use arch linux file hierarchy sed -i "files/maldet" \ -e "s|^inspath='/usr/local/maldetect'|inspath='/usr/share/maldet'|" \ -e 's|^intcnf="\$inspath/internals/internals.conf"|intcnf="/etc/maldet/internals.conf"|' sed -i "files/hookscan.sh" \ -e "s|^inspath='/usr/local/maldetect'|inspath=\"/usr/share/maldet\"|" \ -e 's|^intcnf="$inspath/internals/internals.conf"|intcnf="/etc/maldet/internals.conf"|' \ -e 's|hookcnf="$inspath/conf.maldet.hookscan"|hookcnf="/etc/maldet/hookscan.conf"|' \ -e 's|$inspath/maldet|/usr/bin/maldet|' \ -e 's|tmpdir=/var/tmp|tmpdir=/var/lib/maldet/tmp|' cat > "files/conf.maldet.hookscan" <