| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-forensics/chkrootkit/chkrootkit-0.49.ebuild,v 1.9 2011/10/11 17:33:11 jer Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit eutils toolchain-funcs |
| 8 |
|
| 9 |
DESCRIPTION="Tool to locally check for signs of a rootkit" |
| 10 |
HOMEPAGE="http://www.chkrootkit.org/" |
| 11 |
SRC_URI="ftp://ftp.pangeia.com.br/pub/seg/pac/${P}.tar.gz |
| 12 |
mirror://gentoo/${P}-gentoo.diff.bz2" |
| 13 |
|
| 14 |
LICENSE="BSD-2" |
| 15 |
SLOT="0" |
| 16 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" |
| 17 |
IUSE="+cron" |
| 18 |
|
| 19 |
RDEPEND="cron? ( virtual/cron )" |
| 20 |
|
| 21 |
src_prepare() { |
| 22 |
epatch "${WORKDIR}"/${P}-gentoo.diff |
| 23 |
sed -i 's:/var/adm/:/var/log/:g' chklastlog.c || die "sed chklastlog.c failed" |
| 24 |
} |
| 25 |
|
| 26 |
src_compile() { |
| 27 |
emake CC="$(tc-getCC)" STRIP=true sense |
| 28 |
} |
| 29 |
|
| 30 |
src_install() { |
| 31 |
dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc strings-static |
| 32 |
dodoc ACKNOWLEDGMENTS README* |
| 33 |
|
| 34 |
if use cron ; then |
| 35 |
exeinto /etc/cron.weekly |
| 36 |
newexe "${FILESDIR}"/${PN}.cron ${PN} |
| 37 |
fi |
| 38 |
} |
| 39 |
|
| 40 |
pkg_postinst() { |
| 41 |
if use cron ; then |
| 42 |
elog |
| 43 |
elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!" |
| 44 |
elog |
| 45 |
fi |
| 46 |
|
| 47 |
elog |
| 48 |
elog "Some applications, such as portsentry, will cause chkrootkit" |
| 49 |
elog "to produce false positives. Read the chkrootkit FAQ at" |
| 50 |
elog "http://www.chkrootkit.org/ for more information." |
| 51 |
elog |
| 52 |
} |