chkrootkit-0.51.ebuild 1.3 KB

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