| 1 |
# Copyright 1999-2007 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.47.ebuild,v 1.9 2007/06/24 21:15:11 vapier 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/${PN}-0.45-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 |
# we can use the gentoo patch for 0.45 but it needs one change to apply
|
| 22 |
# cleanly -- certainly not enough to warrant using a separate 32k patch.
|
| 23 |
sed -e 's|\(xlogin\)|\^\1|' "${WORKDIR}"/${PN}-0.45-gentoo.diff > \
|
| 24 |
"${WORKDIR}"/${P}-gentoo.diff
|
| 25 |
|
| 26 |
epatch \
|
| 27 |
"${WORKDIR}"/${P}-gentoo.diff \
|
| 28 |
"${FILESDIR}"/${P}-makefile.diff \
|
| 29 |
"${FILESDIR}"/${P}-add-missing-includes.diff
|
| 30 |
|
| 31 |
sed -i 's:${head} -:${head} -n :' chkrootkit || die "sed chkrootkit failed"
|
| 32 |
sed -i 's:/var/adm:/var/log:g' chklastlog.c || die "sed chklastlog.c failed"
|
| 33 |
}
|
| 34 |
|
| 35 |
src_compile() {
|
| 36 |
emake CC=$(tc-getCC) sense || die "emake sense failed"
|
| 37 |
}
|
| 38 |
|
| 39 |
src_install() {
|
| 40 |
dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc \
|
| 41 |
strings-static || die
|
| 42 |
dodoc ACKNOWLEDGMENTS README*
|
| 43 |
|
| 44 |
exeinto /etc/cron.weekly
|
| 45 |
newexe "${FILESDIR}"/${PN}.cron ${PN} || die
|
| 46 |
}
|
| 47 |
|
| 48 |
pkg_postinst() {
|
| 49 |
echo
|
| 50 |
elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!"
|
| 51 |
elog
|
| 52 |
elog "Some applications, such as portsentry, will cause chkrootkit"
|
| 53 |
elog "to produce false positives. Read the chkrootkit FAQ at"
|
| 54 |
elog "http://www.chkrootkit.org/ for more information."
|
| 55 |
echo
|
| 56 |
}
|