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.

101 lines
2.7 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.4.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:=a68af8ea46a038dfb0ad489e8d11dee62a3e63cb4a639f6bb4fac4ded955fe11
  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 ../../devel/ninja/ninja-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
  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. endef
  53. define Package/snort3/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) \
  56. $(PKG_INSTALL_DIR)/usr/bin/snort \
  57. $(1)/usr/bin/
  58. $(INSTALL_BIN) \
  59. $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
  60. $(1)/usr/bin/
  61. $(INSTALL_DIR) $(1)/usr/lib/snort
  62. $(CP) \
  63. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
  64. $(1)/usr/lib/snort/
  65. $(CP) \
  66. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
  67. $(1)/usr/lib/snort/
  68. $(INSTALL_DIR) $(1)/usr/share/lua
  69. $(CP) \
  70. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
  71. $(1)/usr/share/lua/
  72. $(INSTALL_DIR) $(1)/etc/snort
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) \
  75. ./files/snort.init \
  76. $(1)/etc/init.d/snort
  77. $(INSTALL_DIR) $(1)/etc/config
  78. $(INSTALL_CONF) \
  79. ./files/snort.config \
  80. $(1)/etc/config/snort
  81. endef
  82. $(eval $(call BuildPackage,snort3))