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.

104 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.0-beta
  8. PKG_VERSION_SHORT:=3.0.0
  9. PKG_RELEASE:=3
  10. PKG_LICENSE:=GPL-2.0
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  12. PKG_CPE_ID:=cpe:/a:snort:snort
  13. PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
  15. PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/snort3
  22. SUBMENU:=Firewall
  23. SECTION:=net
  24. CATEGORY:=Network
  25. DEPENDS:=+libstdcpp +libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
  26. TITLE:=Lightweight Network Intrusion Detection System
  27. URL:=http://www.snort.org/
  28. MENU:=1
  29. endef
  30. define Package/snort3/description
  31. Snort is an open source network intrusion detection and prevention system.
  32. It is capable of performing real-time traffic analysis, alerting, blocking
  33. and packet logging on IP networks. It utilizes a combination of protocol
  34. analysis and pattern matching in order to detect anomalies, misuse and
  35. attacks.
  36. endef
  37. CMAKE_OPTIONS += \
  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_LZMA=OFF
  46. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
  47. TARGET_LDFLAGS += -ltirpc
  48. define Package/snort3/conffiles
  49. /etc/config/snort
  50. endef
  51. define Package/snort3/install
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(INSTALL_BIN) \
  54. $(PKG_INSTALL_DIR)/usr/bin/snort \
  55. $(1)/usr/bin/
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
  58. $(1)/usr/bin/
  59. $(INSTALL_DIR) $(1)/usr/lib/snort
  60. $(CP) \
  61. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
  62. $(1)/usr/lib/snort/
  63. $(CP) \
  64. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
  65. $(1)/usr/lib/snort/
  66. $(INSTALL_DIR) $(1)/usr/share/lua
  67. $(CP) \
  68. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
  69. $(1)/usr/share/lua/
  70. $(CP) \
  71. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
  72. $(1)/usr/share/lua/
  73. $(INSTALL_DIR) $(1)/etc/snort
  74. $(INSTALL_DIR) $(1)/etc/init.d
  75. $(INSTALL_BIN) \
  76. ./files/snort.init \
  77. $(1)/etc/init.d/snort
  78. $(INSTALL_DIR) $(1)/etc/config
  79. $(INSTALL_CONF) \
  80. ./files/snort.config \
  81. $(1)/etc/config/snort
  82. endef
  83. $(eval $(call BuildPackage,snort3))