mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.6 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/misc/snort/snort.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. if [ $prefix_auto = 1 ] ; then
  23. prefix=opt/snort
  24. set_confopt
  25. fi
  26. #No clean install dir checks in ROCK yet.
  27. # postgresql support
  28. pkginstalled postgresql && var_append extraconfopt " " "--with-postgresql=/opt/postgresql"
  29. # mysql support
  30. pkginstalled mysql && var_append extraconfopt " " "--with-mysql=/opt/mysql"
  31. # FlexResp feature
  32. # NOTE: At time of writing, FlexResp:
  33. # (a) is considered in Alpha stage and "to be used with caution"
  34. # (b) requires libnet, which is an unmaintained package in ROCK
  35. # (c) does not work with libnet 1.1 (the latest stable release)
  36. # (d) works only with libnet 1.02a, which is deprecated
  37. # For these reasons, FlexResp is not enabled.
  38. # var_append extraconfopt " " "--enable-flexresp"
  39. snort_premake()
  40. {
  41. # Comply with FHS for /var/opt/
  42. sed -i 's/\/var\/log\/snort/\/var\/opt\/snort\/log/' src/snort.h
  43. }
  44. snort_postmake()
  45. {
  46. # 'make install' sadly doesn't copy a lot of useful stuff
  47. # so we have to do it ourselves
  48. # The contrib directory contains helper scripts and tars
  49. # of plugins. This directory is just copied over.
  50. cp -fr contrib $docdir
  51. # The etc directory includes snort.conf, sigs, maps and rules.
  52. # Technically the maps should not be here but snort convention
  53. # places them in etc.
  54. # For security reasons this directory should not be world-readable
  55. mkdir -p $root/$prefix/var
  56. mkdir -p $root/$prefix/etc
  57. cp -fr etc/* $root/$prefix/etc/
  58. cp -fr rules $root/$prefix/etc/
  59. sed -i 's/\.\.\/rules/.\/rules/' $root/$prefix/etc/snort.conf
  60. # Create a SysV init script for snort
  61. install_init snort $confdir/snort.init
  62. }
  63. hook_add premake 3 snort_premake
  64. hook_add postmake 3 snort_postmake