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.

103 lines
2.5 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_SOURCE:=snort-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
  14. PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=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 +libdaq +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. -DENABLE_STATIC_DAQ:BOOL=NO \
  38. -DENABLE_COREFILES:BOOL=NO \
  39. -DENABLE_GDB:BOOL=NO \
  40. -DMAKE_DOC:BOOL=NO \
  41. -DMAKE_HTML_DOC:BOOL=NO \
  42. -DMAKE_PDF_DOC:BOOL=NO \
  43. -DMAKE_TEXT_DOC:BOOL=NO \
  44. -DHAVE_LZMA=OFF
  45. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
  46. TARGET_LDFLAGS += -ltirpc
  47. define Package/snort3/conffiles
  48. /etc/config/snort
  49. endef
  50. define Package/snort3/install
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) \
  53. $(PKG_INSTALL_DIR)/usr/bin/snort \
  54. $(1)/usr/bin/
  55. $(INSTALL_BIN) \
  56. $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
  57. $(1)/usr/bin/
  58. $(INSTALL_DIR) $(1)/usr/lib/snort
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
  61. $(1)/usr/lib/snort/
  62. $(CP) \
  63. $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
  64. $(1)/usr/lib/snort/
  65. $(INSTALL_DIR) $(1)/usr/share/lua
  66. $(CP) \
  67. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
  68. $(1)/usr/share/lua/
  69. $(CP) \
  70. $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.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))