chkrootkit-0.49.ebuild 1.2 KB

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