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.0.0
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
  11. PKG_HASH:=c4e2e78e3afa879d7e35e482afe42a6c4b96ed26198a9979edf7953b5151ccbf
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  14. PKG_LICENSE:=GPL-2.0-only
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:snort:snort
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../../devel/ninja/ninja-cmake.mk
  19. define Package/snort3
  20. SUBMENU:=Firewall
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
  24. TITLE:=Lightweight Network Intrusion Detection System
  25. URL:=http://www.snort.org/
  26. MENU:=1
  27. endef
  28. define Package/snort3/description
  29. Snort is an open source network intrusion detection and prevention system.
  30. It is capable of performing real-time traffic analysis, alerting, blocking
  31. and packet logging on IP networks. It utilizes a combination of protocol
  32. analysis and pattern matching in order to detect anomalies, misuse and
  33. attacks.
  34. endef
  35. CMAKE_OPTIONS += \
  36. -DUSE_TIRPC:BOOL=YES \
  37. -DENABLE_STATIC_DAQ:BOOL=NO \
  38. -DDAQ_INCLUDE_DIR=$(STAGING_DIR)/usr/include/daq3 \
  39. -DDAQ_LIBRARIES_DIR_HINT:PATH=$(STAGING_DIR)/usr/lib/daq3 \
  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))