initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 194ec61843b9598ce90873c812b817c4b96e2e0d Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Thu, 2 Sep 2021 12:56:00 +0300
|
||||
Subject: [PATCH] Detect libpcap dependencies using pkg-config
|
||||
|
||||
When building statically the link command line must include all
|
||||
dependencies of all libraries. libpcap can optionally depend on libnl.
|
||||
mausezahn can't build statically in this case.
|
||||
|
||||
Use pkg-config in configure and in the link command to construct the
|
||||
library flags we need to link with libpcap.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
||||
---
|
||||
Upstream status: commit 194ec61843b9598ce90873c812b817c4b96e2e0d
|
||||
|
||||
configure | 4 +++-
|
||||
mausezahn/Makefile | 2 +-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 510826a798f5..598ae2433a7a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -588,7 +588,9 @@ int main(void)
|
||||
}
|
||||
EOF
|
||||
|
||||
- $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
|
||||
+ $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c \
|
||||
+ $($PKG_CONFIG --libs libpcap 2>> config.log) \
|
||||
+ >> config.log 2>&1
|
||||
if [ ! -x $TMPDIR/pcaptest ] ; then
|
||||
echo "[NO]"
|
||||
echo "CONFIG_LIBPCAP=0" >> Config
|
||||
diff --git a/mausezahn/Makefile b/mausezahn/Makefile
|
||||
index ca16b6579583..9544565355cc 100644
|
||||
--- a/mausezahn/Makefile
|
||||
+++ b/mausezahn/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
mausezahn-libs = -lcli \
|
||||
-lnet \
|
||||
- -lpcap \
|
||||
+ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libpcap 2> /dev/null ) \
|
||||
-lrt \
|
||||
-lpthread \
|
||||
-lm
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
config BR2_PACKAGE_NETSNIFF_NG
|
||||
bool "netsniff-ng"
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_LIBNL
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
select BR2_PACKAGE_LIBNETFILTER_CONNTRACK
|
||||
select BR2_PACKAGE_LIBURCU
|
||||
help
|
||||
netsniff-ng is a free, performant Linux network analyzer and
|
||||
networking toolkit. If you will, the Swiss army knife for
|
||||
network packets.
|
||||
|
||||
http://netsniff-ng.org
|
||||
|
||||
if BR2_PACKAGE_NETSNIFF_NG
|
||||
|
||||
config BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN
|
||||
bool "mausezahn"
|
||||
default y
|
||||
# Build with uClibc fails due to missing ceill()
|
||||
depends on !BR2_TOOLCHAIN_USES_UCLIBC
|
||||
select BR2_PACKAGE_LIBCLI
|
||||
select BR2_PACKAGE_LIBNET
|
||||
|
||||
comment "mausezahn needs glibc or musl toolchain"
|
||||
depends on BR2_TOOLCHAIN_USES_UCLIBC
|
||||
|
||||
endif
|
||||
|
||||
comment "netsniff-ng needs a toolchain w/ threads, headers >= 3.0"
|
||||
depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally calculated after checking signature
|
||||
sha256 77d17d4158faf1d93c7d922a1bd7f093a8b437bd658292c830708540e10894ba netsniff-ng-0.6.8.tar.xz
|
||||
# Locally computed
|
||||
sha256 b353349ba51e0d4b59cf2f188f0c285296e154ce8c58954bc5e0dc0282a4db2d README
|
||||
sha256 8f6d85366f3763557d6ddd0637988b9ba11edef354e3c9302fff4262a235c387 COPYING
|
||||
@@ -0,0 +1,61 @@
|
||||
################################################################################
|
||||
#
|
||||
# netsniff-ng
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NETSNIFF_NG_VERSION = 0.6.8
|
||||
NETSNIFF_NG_SITE = http://pub.netsniff-ng.org/netsniff-ng
|
||||
NETSNIFF_NG_SOURCE = netsniff-ng-$(NETSNIFF_NG_VERSION).tar.xz
|
||||
NETSNIFF_NG_LICENSE = GPL-2.0
|
||||
NETSNIFF_NG_LICENSE_FILES = README COPYING
|
||||
# Prevent netsniff-ng configure script from finding a host installed nacl
|
||||
NETSNIFF_NG_CONF_ENV = \
|
||||
NACL_INC_DIR=/dev/null \
|
||||
NACL_LIB_DIR=/dev/null
|
||||
NETSNIFF_NG_DEPENDENCIES = host-pkgconf libnl libpcap libnetfilter_conntrack liburcu
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN),y)
|
||||
NETSNIFF_NG_DEPENDENCIES += libcli libnet
|
||||
NETSNIFF_NG_BUILD_MAKE_TARGET = all
|
||||
NETSNIFF_NG_INSTALL_MAKE_TARGET = install
|
||||
else
|
||||
NETSNIFF_NG_BUILD_MAKE_TARGET = allbutmausezahn
|
||||
NETSNIFF_NG_INSTALL_MAKE_TARGET = install_allbutmausezahn
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GEOIP),y)
|
||||
NETSNIFF_NG_DEPENDENCIES += geoip
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
||||
NETSNIFF_NG_DEPENDENCIES += ncurses
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
NETSNIFF_NG_DEPENDENCIES += zlib
|
||||
endif
|
||||
|
||||
# hand-written configure script and makefile
|
||||
define NETSNIFF_NG_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(NETSNIFF_NG_CONF_ENV) \
|
||||
$(TARGET_CONFIGURE_ARGS) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
./configure \
|
||||
--prefix=$(TARGET_DIR)/usr \
|
||||
)
|
||||
endef
|
||||
|
||||
define NETSNIFF_NG_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
|
||||
$(NETSNIFF_NG_BUILD_MAKE_TARGET)
|
||||
endef
|
||||
|
||||
define NETSNIFF_NG_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
||||
PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc \
|
||||
-C $(@D) $(NETSNIFF_NG_INSTALL_MAKE_TARGET)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user