| 1 |
# Copyright 1999-2008 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.ebuild,v 1.1 2008/10/06 19:38:01 pva 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="AMS"
|
| 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 |
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 || die "emake sense failed"
|
| 28 |
}
|
| 29 |
|
| 30 |
src_install() {
|
| 31 |
dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc \
|
| 32 |
strings-static || die
|
| 33 |
dodoc ACKNOWLEDGMENTS README*
|
| 34 |
|
| 35 |
exeinto /etc/cron.weekly
|
| 36 |
newexe "${FILESDIR}"/${PN}.cron ${PN} || die
|
| 37 |
}
|
| 38 |
|
| 39 |
pkg_postinst() {
|
| 40 |
echo
|
| 41 |
elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!"
|
| 42 |
elog
|
| 43 |
elog "Some applications, such as portsentry, will cause chkrootkit"
|
| 44 |
elog "to produce false positives. Read the chkrootkit FAQ at"
|
| 45 |
elog "http://www.chkrootkit.org/ for more information."
|
| 46 |
echo
|
| 47 |
}
|