summaryrefslogtreecommitdiff
path: root/app-forensics/rkhunter/rkhunter-1.4.6-r2.ebuild
blob: 7bda0492559fa364d3ac81186de38b4b2b8fe0d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit bash-completion-r1

DESCRIPTION="Rootkit Hunter scans for known and unknown rootkits, backdoors, and sniffers"
HOMEPAGE="https://rkhunter.sf.net/"
SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-grep-3.8.patch.xz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~mips ppc x86"
IUSE=""

RDEPEND="
	app-shells/bash
	dev-lang/perl
	sys-process/lsof[rpc]
"

S="${WORKDIR}/${P}/files"

PATCHES=(
	"${FILESDIR}/${PN}-1.4.6-conf.patch"
	"${FILESDIR}/${PN}-1.4.6-no-insecure-web.patch"
	"${WORKDIR}/${PN}-1.4.6-grep-3.8.patch"
)

src_install() {
	# rkhunter requires to be root
	dosbin ${PN}

	insinto /etc
	doins ${PN}.conf

	exeinto /usr/lib/${PN}/scripts
	doexe *.pl

	insinto /var/lib/${PN}/db
	doins *.dat

	insinto /var/lib/${PN}/db/i18n
	doins i18n/*

	doman ${PN}.8
	dodoc ACKNOWLEDGMENTS CHANGELOG FAQ README

	exeinto /etc/cron.daily
	newexe "${FILESDIR}/${PN}-1.4.cron" ${PN}

	newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}
}

pkg_postinst() {
	elog "A cron script has been installed to /etc/cron.daily/rkhunter."
	elog "To enable it, edit /etc/cron.daily/rkhunter and follow the"
	elog "directions."
	elog "If you want ${PN} to send mail, you will need to install"
	elog "virtual/mailx or alter the EMAIL_CMD variable in the"
	elog "cron script and possibly the MAIL_CMD variable in the"
	elog "${PN}.conf file to use another mail client."
}