scanlogd-2.2.7.ebuild 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils savedconfig toolchain-funcs user
  5. DESCRIPTION="a port scan detection tool"
  6. SRC_URI="http://www.openwall.com/scanlogd/${P}.tar.gz"
  7. HOMEPAGE="http://www.openwall.com/scanlogd/"
  8. LICENSE="scanlogd GPL-2" # GPL-2 for initscript
  9. SLOT="0"
  10. KEYWORDS="~amd64 ppc x86"
  11. IUSE="+nids pcap"
  12. REQUIRED_USE="?? ( nids pcap )"
  13. DEPEND="
  14. nids? ( net-libs/libnids )
  15. pcap? ( net-libs/libpcap )
  16. "
  17. RDEPEND="${DEPEND}"
  18. src_prepare() {
  19. epatch "${FILESDIR}"/${P}-gentoo.patch
  20. restore_config params.h
  21. tc-export CC
  22. }
  23. src_compile() {
  24. local target=linux
  25. use nids && target=libnids
  26. use pcap && target=libpcap
  27. emake ${target}
  28. }
  29. src_install() {
  30. dosbin scanlogd
  31. doman scanlogd.8
  32. newinitd "${FILESDIR}"/scanlogd.rc scanlogd
  33. save_config params.h
  34. }
  35. pkg_preinst() {
  36. enewgroup scanlogd
  37. enewuser scanlogd -1 -1 /dev/null scanlogd
  38. }