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.

105 lines
2.6 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.0.3-1
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
  11. PKG_HASH:=30a22cec90d77504db80d8e8902f98c536b1b8160c575fb66a97a6765f83c600
  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. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/snort3
  21. SUBMENU:=Firewall
  22. SECTION:=net
  23. CATEGORY:=Network
  24. DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
  25. TITLE:=Lightweight Network Intrusion Detection System
  26. URL:=http://www.snort.org/
  27. MENU:=1
  28. endef
  29. define Package/snort3/description
  30. Snort is an open source network intrusion detection and prevention system.
  31. It is capable of performing real-time traffic analysis, alerting, blocking
  32. and packet logging on IP networks. It utilizes a combination of protocol
  33. analysis and pattern matching in order to detect anomalies, misuse and
  34. attacks.
  35. endef
  36. CMAKE_OPTIONS += \
  37. -DUSE_TIRPC:BOOL=YES \
  38. -DENABLE_STATIC_DAQ:BOOL=NO \
  39. -DENABLE_COREFILES:BOOL=NO \
  40. -DENABLE_GDB:BOOL=NO \
  41. -DMAKE_DOC:BOOL=NO \
  42. -DMAKE_HTML_DOC:BOOL=NO \
  43. -DMAKE_PDF_DOC:BOOL=NO \
  44. -DMAKE_TEXT_DOC:BOOL=NO \
  45. -DHAVE_LIBUNWIND=OFF \
  46. -DHAVE_LZMA=OFF
  47. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
  48. TARGET_LDFLAGS += -ltirpc
  49. define Package/snort3/conffiles
  50. /etc/config/snort
  51. endef
  52. define Package/snort3/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) \
  55. $(PKG_INSTALL_DIR)/usr/bin/snort \
  56. $(1)/usr/bin/
  57. $(INSTALL_BIN) \
  58. $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
  59. $(1)/usr/bin/
  60. $(INSTALL_DIR) $(1)/usr/lib/snort
  61. $(CP) \
  62. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
  63. $(1)/usr/lib/snort/
  64. $(CP) \
  65. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
  66. $(1)/usr/lib/snort/
  67. $(INSTALL_DIR) $(1)/usr/share/lua
  68. $(CP) \
  69. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
  70. $(1)/usr/share/lua/
  71. $(CP) \
  72. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
  73. $(1)/usr/share/lua/
  74. $(INSTALL_DIR) $(1)/etc/snort
  75. $(INSTALL_DIR) $(1)/etc/init.d
  76. $(INSTALL_BIN) \
  77. ./files/snort.init \
  78. $(1)/etc/init.d/snort
  79. $(INSTALL_DIR) $(1)/etc/config
  80. $(INSTALL_CONF) \
  81. ./files/snort.config \
  82. $(1)/etc/config/snort
  83. endef
  84. $(eval $(call BuildPackage,snort3))