Skip to content

Commit

Permalink
build(snort3): updating package (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile authored Feb 12, 2025
1 parent 5e29327 commit 7ced707
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 7 deletions.
68 changes: 68 additions & 0 deletions packages/libdaq3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# Copyright (C) 2012-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libdaq3
PKG_VERSION:=3.0.18
PKG_RELEASE:=1

PKG_MAINTAINER:=W. Michael Petullo <[email protected]>

PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING LICENSE

PKG_SOURCE:=libdaq-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/snort3/libdaq/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=301db00d33ccd7be546ffb40cd9f4fc41031a5d67196b48bd8b76ae36e10f078
PKG_BUILD_DIR:=$(BUILD_DIR)/libdaq-$(PKG_VERSION)

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/libdaq3
SECTION:=libs
CATEGORY:=Libraries
TITLE:=DAQ library
URL:=$(PKG_SOURCE_URL)
DEPENDS:=+libdnet +libpcap +libstdcpp +libmnl +libnetfilter-queue
endef

define Package/libdaq3/description
Data Acquisition library for packet I/O.
endef

CONFIGURE_ARGS+= \
--disable-static \
--enable-nfq-module \
--with-dnet-includes="$(STAGING_DIR)/usr/include" \
--with-dnet-libraries="$(STAGING_DIR)/usr/lib" \
--with-libpcap-includes="$(STAGING_DIR)/usr/include" \
--with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \

define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/daq3
$(CP) $(PKG_INSTALL_DIR)/usr/include/. $(STAGING_DIR)/usr/include/daq3/
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq3
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/daq3/
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq3/daq
$(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/* $(STAGING_DIR)/usr/lib/daq3/daq/
endef

define Package/libdaq3/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/daq
$(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/*.so* $(1)/usr/lib/daq/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef

$(eval $(call BuildPackage,libdaq3))
10 changes: 5 additions & 5 deletions packages/snort3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=snort3
PKG_VERSION:=3.1.84.0
PKG_RELEASE:=5
PKG_VERSION:=3.6.2.0
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/snort3/snort3
PKG_MIRROR_HASH:=ffa69fdd95c55a943ab4dd782923caf31937dd8ad29e202d7fe781373ed84444
PKG_MIRROR_HASH:=961649f0ea661b6454c9c056a789708a601dcd367515e506ada5d86fea9cee18

PKG_MAINTAINER:=W. Michael Petullo <[email protected]>, John Audia <[email protected]>
PKG_LICENSE:=GPL-2.0-only
Expand All @@ -28,8 +28,8 @@ define Package/snort3
CATEGORY:=Network
DEPENDS:= \
+(TARGET_x86||TARGET_x86_64):hyperscan-runtime \
+gperftools-runtime +libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre \
+libpthread +libuuid +zlib +libhwloc +libtirpc +luajit +libatomic \
+gperftools-runtime +libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre2 \
+libpthread +libuuid +zlib +libhwloc +libtirpc @HAS_LUAJIT_ARCH +luajit +libatomic \
+kmod-nft-queue +liblzma +ucode +ucode-mod-fs +ucode-mod-uci
TITLE:=Lightweight Network Intrusion Detection System
URL:=http://www.snort.org/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Workaround to build until upstream bug is fixed[1].
endif()
--- a/config.cmake.h.in
+++ b/config.cmake.h.in
@@ -124,7 +124,6 @@
@@ -127,7 +127,6 @@

/* hyperscan available */
#cmakedefine HAVE_HYPERSCAN 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ src/network_inspectors/packet_capture/packet_capture.h:25:54: error: 'int16_t' d
#include <string>
+#include <cstdint>

void packet_capture_enable(const std::string&, const int16_t g = -1, const std::string& t = "");
void packet_capture_enable(const std::string&, const int16_t g = -1, const std::string& t = "", const bool ci = true);
void packet_capture_disable();

0 comments on commit 7ced707

Please sign in to comment.