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.

87 lines
2.8 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../snort/snort.conf
  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. # --- T2-COPYRIGHT-NOTE-END ---
  16. if [ $prefix_auto = 1 ] ; then
  17. prefix=opt/snort
  18. set_confopt
  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=/$( pkgprefix mysql )"
  31. var_append LD_RUN_PATH ':' "$( pkgprefix libdir mysql )/mysql"
  32. export LD_RUN_PATH
  33. fi
  34. # prelude support
  35. if pkginstalled libprelude; then
  36. pkgprefix -t libprelude
  37. var_append extraconfopt " " "--enable-prelude"
  38. var_append extraconfopt " " "--with-libprelude-prefix=/$( pkgprefix libprelude )"
  39. fi
  40. # FlexResp feature
  41. # NOTE: At time of writing, FlexResp:
  42. # (a) is considered in Alpha stage and "to be used with caution"
  43. # (b) requires libnet, which is an unmaintained package in ROCK
  44. # (c) does not work with libnet 1.1 (the latest stable release)
  45. # (d) works only with libnet 1.02a, which is deprecated
  46. # For these reasons, FlexResp is not enabled.
  47. # var_append extraconfopt " " "--enable-flexresp"
  48. # 2005-09-21 //morfoh
  49. # snort-inline isn't building due to libnet 1.02a dependency
  50. # see Note above
  51. # var_append extraconfopt " " "--enable-inline"
  52. snort_preconf()
  53. {
  54. # Comply with FHS for /var/opt/
  55. sed -i "s,/var/log/snort,${localstatedir}/log," src/snort.h
  56. }
  57. snort_postmake()
  58. {
  59. # 'make install' sadly doesn't copy a lot of useful stuff
  60. # so we have to do it ourselves
  61. # The etc directory includes snort.conf, sigs and maps.
  62. # Technically the maps should not be here but snort convention
  63. # places them in etc.
  64. # For security reasons this directory should not be world-readable
  65. cp -fr etc/{*.conf,*.config,*.map,generators,sid} $root/$sysconfdir
  66. # Installing
  67. # Sourcefire VRT Certified Rules - The Official Snort Ruleset (unregistered user release)
  68. tar -v $taropt `match_source_file -p snortrules-pr` -C $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