snortsam-2.50-r1.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils toolchain-funcs
  4. MY_P="${PN}-src-${PV}"
  5. DESCRIPTION="Snort plugin that allows automated blocking of IP addresses on several firewalls"
  6. HOMEPAGE="http://www.snortsam.net/"
  7. SRC_URI="http://www.snortsam.net/files/snortsam/${MY_P}.tar.gz
  8. mirror://gentoo/${PN}-2.50-ciscoacl.diff.bz2"
  9. LICENSE="BSD-2"
  10. SLOT="0"
  11. KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
  12. IUSE=""
  13. S=${WORKDIR}/${PN}
  14. src_unpack() {
  15. unpack ${A}
  16. cd "${S}"
  17. # bug 155955, ciscoacl segfaults with gcc-4.1.1
  18. epatch "${DISTDIR}"/${PN}-2.50-ciscoacl.diff.bz2
  19. sed -i -e "s:sbin/functions.sh:etc/init.d/functions.sh:" \
  20. -e "s: -O2 : ${CFLAGS} :" \
  21. -e "s:gcc :$(tc-getCC) :" \
  22. -e "s:\( -o ../snortsam\): ${LDFLAGS}\1:" makesnortsam.sh || die "sed failed"
  23. ecvs_clean
  24. }
  25. src_compile() {
  26. sh makesnortsam.sh || die "makesnortsam.sh failed"
  27. }
  28. src_install() {
  29. dobin snortsam || die "dobin failed"
  30. find "${S}" -depth -type f -name "*.asc" -exec rm -f {} \;
  31. dodoc docs/* conf/*
  32. }
  33. pkg_postinst() {
  34. elog
  35. elog "To use snortsam with snort, you'll have to compile snort with USE=snortsam."
  36. elog "Read the INSTALL file to configure snort for snortsam, and configure"
  37. elog "snortsam for your particular firewall."
  38. elog
  39. }