2010-03-05 20:24:13 +00:00
|
|
|
#
|
2013-04-01 21:07:34 +00:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpcap
|
2021-07-13 20:24:54 +00:00
|
|
|
PKG_VERSION:=1.10.1
|
|
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2021-12-26 22:38:52 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
2021-07-13 20:24:54 +00:00
|
|
|
PKG_HASH:=ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4
|
2006-05-24 07:18:36 +00:00
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2021-01-04 23:46:42 +00:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
2012-10-10 12:49:37 +00:00
|
|
|
|
2020-02-22 09:40:26 +00:00
|
|
|
PKG_ASLR_PIE_REGULAR:=1
|
2019-10-18 12:10:06 +00:00
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2019-10-18 12:10:06 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
define Package/libpcap
|
2006-09-23 19:29:00 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level packet capture library
|
|
|
|
URL:=http://www.tcpdump.org/
|
2010-04-16 10:03:53 +00:00
|
|
|
MENU:=1
|
2019-01-22 18:17:32 +00:00
|
|
|
ABI_VERSION:=1
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 08:34:51 +00:00
|
|
|
define Package/libpcap/description
|
2010-03-05 20:24:13 +00:00
|
|
|
This package contains a system-independent library for user-level network packet
|
|
|
|
capture.
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-25 03:30:10 +00:00
|
|
|
define Package/libpcap/config
|
2010-04-16 10:03:53 +00:00
|
|
|
source "$(SOURCE)/Config.in"
|
2009-04-25 03:30:10 +00:00
|
|
|
endef
|
|
|
|
|
2021-07-25 11:50:53 +00:00
|
|
|
define Package/rpcapd
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=Capture daemon to be controlled by a remote libpcap application
|
|
|
|
URL:=http://www.tcpdump.org/
|
|
|
|
DEPENDS+= +libpcap
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifdef CONFIG_PACKAGE_rpcapd
|
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DENABLE_REMOTE=ON
|
|
|
|
endif
|
|
|
|
|
2019-10-18 12:10:06 +00:00
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DBUILD_WITH_LIBNL=OFF \
|
2021-01-04 23:46:42 +00:00
|
|
|
-DINET6=O$(if $(CONFIG_IPV6),N,FF) \
|
|
|
|
-DPCAP_SUPPORT_NETFILTER=O$(if $(CONFIG_PCAP_HAS_NETFILTER),N,FF)
|
2019-10-18 12:10:06 +00:00
|
|
|
|
|
|
|
# grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
|
|
|
|
CMAKE_OPTIONS += \
|
2021-01-04 23:46:42 +00:00
|
|
|
-DDISABLE_BLUETOOTH=O$(if $(CONFIG_PCAP_HAS_BT),FF,N) \
|
2019-10-18 12:10:06 +00:00
|
|
|
-DDISABLE_DAG=ON \
|
|
|
|
-DDISABLE_DBUS=ON \
|
2021-01-04 23:46:42 +00:00
|
|
|
-DDISABLE_DPDK=ON \
|
|
|
|
-DDISABLE_LINUX_USBMON=O$(if $(CONFIG_PCAP_HAS_USB),FF,N) \
|
2019-10-18 12:10:06 +00:00
|
|
|
-DDISABLE_NETMAP=ON \
|
|
|
|
-DDISABLE_RDMA=ON \
|
|
|
|
-DDISABLE_SEPTEL=ON \
|
|
|
|
-DDISABLE_SNF=ON \
|
|
|
|
-DDISABLE_TC=ON \
|
|
|
|
|
|
|
|
# Debugging options
|
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DBDEBUG=OFF \
|
|
|
|
-DYYDEBUG=OFF \
|
|
|
|
|
2020-12-15 01:56:17 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(call Build/InstallDev/cmake,$(1))
|
|
|
|
$(SED) \
|
|
|
|
's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
|
|
|
|
$(1)/usr/bin/pcap-config
|
|
|
|
$(INSTALL_DIR) $(2)/bin
|
|
|
|
$(LN) ../../usr/bin/pcap-config $(2)/bin/pcap-config
|
|
|
|
endef
|
|
|
|
|
2006-06-18 18:30:40 +00:00
|
|
|
define Package/libpcap/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2019-01-22 18:17:32 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
2021-07-25 11:50:53 +00:00
|
|
|
define Package/rpcapd/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rpcapd $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
2006-05-24 07:18:36 +00:00
|
|
|
$(eval $(call BuildPackage,libpcap))
|
2021-07-25 11:50:53 +00:00
|
|
|
$(eval $(call BuildPackage,rpcapd))
|