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.

109 lines
2.8 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=snort3
  7. PKG_VERSION:=3.1.18.0
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
  11. PKG_HASH:=6e45c16b1815d832b5d6edcd2b705e7838e25c76bfd54b3e86c55ecba6de420a
  12. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  13. PKG_LICENSE:=GPL-2.0-only
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_CPE_ID:=cpe:/a:snort:snort
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/cmake.mk
  18. define Package/snort3
  19. SUBMENU:=Firewall
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit +libatomic
  23. TITLE:=Lightweight Network Intrusion Detection System
  24. URL:=http://www.snort.org/
  25. MENU:=1
  26. endef
  27. define Package/snort3/description
  28. Snort is an open source network intrusion detection and prevention system.
  29. It is capable of performing real-time traffic analysis, alerting, blocking
  30. and packet logging on IP networks. It utilizes a combination of protocol
  31. analysis and pattern matching in order to detect anomalies, misuse and
  32. attacks.
  33. endef
  34. CMAKE_OPTIONS += \
  35. -DUSE_TIRPC:BOOL=YES \
  36. -DENABLE_STATIC_DAQ:BOOL=NO \
  37. -DDAQ_INCLUDE_DIR=$(STAGING_DIR)/usr/include/daq3 \
  38. -DDAQ_LIBRARIES_DIR_HINT:PATH=$(STAGING_DIR)/usr/lib/daq3 \
  39. -DFLEX_INCLUDES:PATH=$(STAGING_DIR_HOST)/include \
  40. -DENABLE_COREFILES:BOOL=NO \
  41. -DENABLE_GDB:BOOL=NO \
  42. -DMAKE_DOC:BOOL=NO \
  43. -DMAKE_HTML_DOC:BOOL=NO \
  44. -DMAKE_PDF_DOC:BOOL=NO \
  45. -DMAKE_TEXT_DOC:BOOL=NO \
  46. -DHAVE_LIBUNWIND=OFF \
  47. -DHAVE_LZMA=OFF
  48. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/daq3 -I$(STAGING_DIR)/usr/include/tirpc
  49. TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/daq3 -ltirpc
  50. define Package/snort3/conffiles
  51. /etc/config/snort
  52. /etc/snort/
  53. endef
  54. define Package/snort3/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/bin/snort \
  58. $(1)/usr/bin/
  59. $(INSTALL_BIN) \
  60. $(PKG_INSTALL_DIR)/usr/bin/snort2lua \
  61. $(1)/usr/bin/
  62. $(INSTALL_BIN) \
  63. $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
  64. $(1)/usr/bin/
  65. $(INSTALL_DIR) $(1)/usr/lib/snort
  66. $(CP) \
  67. $(PKG_INSTALL_DIR)/usr/lib/snort/daq/daq_hext.so \
  68. $(1)/usr/lib/snort/
  69. $(CP) \
  70. $(PKG_INSTALL_DIR)/usr/lib/snort/daq/daq_file.so \
  71. $(1)/usr/lib/snort/
  72. $(INSTALL_DIR) $(1)/usr/share/lua
  73. $(CP) \
  74. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
  75. $(1)/usr/share/lua/
  76. $(INSTALL_DIR) $(1)/etc/snort
  77. $(INSTALL_CONF) \
  78. $(PKG_INSTALL_DIR)/usr/etc/snort/*.lua \
  79. $(1)/etc/snort
  80. $(INSTALL_DIR) $(1)/etc/init.d
  81. $(INSTALL_BIN) \
  82. ./files/snort.init \
  83. $(1)/etc/init.d/snort
  84. $(INSTALL_DIR) $(1)/etc/config
  85. $(INSTALL_CONF) \
  86. ./files/snort.config \
  87. $(1)/etc/config/snort
  88. endef
  89. $(eval $(call BuildPackage,snort3))