OpenSDE Packages Database (without history before r20070)
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.

92 lines
3.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../snort/snort.conf
  5. # Copyright (C) 2007 - 2012 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  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; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if [ $prefix_auto = 1 ] ; then
  17. # use a dedicted sysconfdir instead of installing into /etc
  18. sysconfdir="$sysconfdir/$pkg"
  19. fi
  20. # postgresql support
  21. if pkginstalled postgresql; then
  22. pkgprefix -t postgresql
  23. var_append extraconfopt " " "--with-postgresql=/$( pkgprefix postgresql )"
  24. var_append LDFLAGS ' ' "-L$( pkgprefix libdir postgresql )"
  25. export LDFLAGS
  26. fi
  27. # mysql support
  28. if pkginstalled mysql; then
  29. pkgprefix -t mysql
  30. var_append extraconfopt " " "--with-mysql-includes=$root/$( pkgprefix includedir mysql )"
  31. var_append extraconfopt " " "--with-mysql-libraries=$root/$( pkgprefix libdir mysql )"
  32. fi
  33. # prelude support
  34. if pkginstalled libprelude; then
  35. pkgprefix -t libprelude
  36. var_append extraconfopt " " "--enable-prelude"
  37. var_append extraconfopt " " "--with-libprelude-prefix=/$( pkgprefix libprelude )"
  38. fi
  39. # 2005-09-21 //morfoh
  40. # snort-inline isn't building due to libnet 1.02a dependency
  41. # see Note above
  42. # var_append extraconfopt " " "--enable-inline"
  43. # FlexResp3 Support
  44. pkginstalled libdnet && var_append confopt ' ' "--enable-flexresp3"
  45. # TimeStats functionality
  46. var_append confopt ' ' "--enable-timestats"
  47. # Statistics reporting through proc
  48. var_append confopt ' ' "--enable-linux-smp-stats"
  49. snort_preconf()
  50. {
  51. # Comply with FHS for /var/opt/
  52. sed -i "s,/var/log/snort,${localstatedir}/log," src/snort.h
  53. # fix etc/snort.conf
  54. sed -i \
  55. -e "s;dynamicpreprocessor directory \/usr\/local/lib\/snort_dynamicpreprocessor;dynamicpreprocessor directory $libdir\/snort_dynamicpreprocessor;" \
  56. -e "s;dynamicengine \/usr\/local/lib\/snort_dynamicengine;dynamicengine $libdir\/snort_dynamicengine;" \
  57. -e "s;dynamicdetection directory \/usr\/local/lib\/snort_dynamicrules;dynamicpreprocessor directory $libdir\/snort_dynamicrules;" \
  58. etc/snort.conf
  59. }
  60. snort_postmake()
  61. {
  62. # 'make install' sadly doesn't copy a lot of useful stuff
  63. # so we have to do it ourselves
  64. # The etc directory includes snort.conf, sigs and maps.
  65. # Technically the maps should not be here but snort convention
  66. # places them in etc.
  67. # For security reasons this directory should not be world-readable
  68. cp -fr etc/{*.conf,*.config,*.map} $root/$sysconfdir
  69. # some changes on the shipped snort.conf example we use as default
  70. # replacing RULE_PATH '../rules' to './rules'
  71. sed -i 's,\.\./rules,./rules,' $root/$sysconfdir/snort.conf
  72. }
  73. hook_add preconf 5 snort_preconf
  74. hook_add postmake 5 snort_postmake
  75. # install header files into $includedir/snort and not into
  76. # $prefix/src/snort_dynamicsrc/
  77. var_insert makeinstopt ' ' "srcinstdir=$root$includedir/snort"