chkrootkit-0.50.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  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. https://dev.gentoo.org/~xmw/${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 -e 's:/var/adm/:/var/log/:g' \
  17. -i chklastlog.c || die
  18. }
  19. src_compile() {
  20. emake CC="$(tc-getCC)" STRIP=true sense
  21. }
  22. src_install() {
  23. dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc strings-static
  24. dodoc ACKNOWLEDGMENTS README*
  25. if use cron ; then
  26. exeinto /etc/cron.weekly
  27. newexe "${FILESDIR}"/${PN}.cron ${PN}
  28. fi
  29. }
  30. pkg_postinst() {
  31. if use cron ; then
  32. elog
  33. elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!"
  34. elog
  35. fi
  36. elog
  37. elog "Some applications, such as portsentry, will cause chkrootkit"
  38. elog "to produce false positives. Read the chkrootkit FAQ at"
  39. elog "http://www.chkrootkit.org/ for more information."
  40. elog
  41. }