| 1 |
# Copyright 1999-2010 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.48-r1.ebuild,v 1.7 2009/01/10 17:11:32 armin76 Exp $ |
| 4 |
|
| 5 |
inherit eutils toolchain-funcs |
| 6 |
|
| 7 |
DESCRIPTION="a tool to locally check for signs of a rootkit" |
| 8 |
HOMEPAGE="http://www.chkrootkit.org/" |
| 9 |
SRC_URI="ftp://ftp.pangeia.com.br/pub/seg/pac/${P}.tar.gz |
| 10 |
mirror://gentoo/${P}-gentoo.diff.bz2" |
| 11 |
|
| 12 |
LICENSE="BSD-2" |
| 13 |
SLOT="0" |
| 14 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" |
| 15 |
IUSE="" |
| 16 |
|
| 17 |
src_unpack() { |
| 18 |
unpack ${A} |
| 19 |
cd "${S}" |
| 20 |
|
| 21 |
epatch "${WORKDIR}/${P}-gentoo.diff" |
| 22 |
epatch "${FILESDIR}/${P}-shell-history-anomalies.diff" |
| 23 |
epatch "${FILESDIR}/${P}-chkutmp.c-some-overruns-fixes.patch" |
| 24 |
sed -i 's:/var/adm/:/var/log/:g' chklastlog.c || die "sed chklastlog.c failed" |
| 25 |
} |
| 26 |
|
| 27 |
src_compile() { |
| 28 |
emake CC=$(tc-getCC) STRIP=true sense || die "emake sense failed" |
| 29 |
} |
| 30 |
|
| 31 |
src_install() { |
| 32 |
dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc \ |
| 33 |
strings-static || die |
| 34 |
dodoc ACKNOWLEDGMENTS README* |
| 35 |
|
| 36 |
exeinto /etc/cron.weekly |
| 37 |
newexe "${FILESDIR}"/${PN}.cron ${PN} || die |
| 38 |
} |
| 39 |
|
| 40 |
pkg_postinst() { |
| 41 |
echo |
| 42 |
elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!" |
| 43 |
elog |
| 44 |
elog "Some applications, such as portsentry, will cause chkrootkit" |
| 45 |
elog "to produce false positives. Read the chkrootkit FAQ at" |
| 46 |
elog "http://www.chkrootkit.org/ for more information." |
| 47 |
echo |
| 48 |
} |