snortalog-2.4.3-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. MY_P="${PN}_v${PV}"
  6. DESCRIPTION="a powerful perl script that summarizes snort logs"
  7. HOMEPAGE="http://jeremy.chartier.free.fr/snortalog/"
  8. SRC_URI="${HOMEPAGE}downloads/${PN}/${MY_P}.tar"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
  12. IUSE="tk"
  13. RDEPEND="
  14. dev-lang/perl[ithreads]
  15. dev-perl/GDGraph
  16. dev-perl/HTML-HTMLDoc
  17. virtual/perl-DB_File
  18. virtual/perl-Getopt-Long
  19. tk? ( dev-perl/Tk )
  20. "
  21. S=${WORKDIR}
  22. src_prepare() {
  23. edos2unix $(find conf/ modules/ -type f) ${PN}.* CHANGES
  24. # fix paths, erroneous can access message
  25. sed -i \
  26. -e "s:\(modules/\):/usr/lib/snortalog/${PV}/\1:g" \
  27. -e 's:\($domains_file = "\)conf/\(domains\)\(".*\):\1/etc/snortalog/\2\3:' \
  28. -e 's:\($rules_file = "\)conf/\(rules\)\(".*\):\1/etc/snortalog/\2\3:' \
  29. -e 's:\($picts_dir ="\)picts\(".*\):\1/etc/snortalog/picts\2:' \
  30. -e 's:\($hw_file = "\)conf/\(hw\)\(".*\):\1/etc/snortalog/\2\3:' \
  31. -e 's:\($lang_file ="\)conf/\(lang\)\(".*\):\1/etc/snortalog/\2\3:' \
  32. -e 's:Can access:Cannot access:' \
  33. snortalog.pl || die
  34. }
  35. src_install () {
  36. dobin snortalog.pl
  37. insinto /etc/snortalog
  38. doins conf/{domains,hw,lang,rules}
  39. insinto /etc/snortalog/picts
  40. doins picts/*
  41. insinto /usr/lib/snortalog/${PV}/modules
  42. doins -r modules/*
  43. dodoc CHANGES doc/snortalog_v2.2.1.pdf
  44. }