2010-03-06 04:24:13 +08:00
|
|
|
#
|
2013-04-02 05:07:34 +08:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 08:35:46 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpcap
|
2021-01-05 07:46:42 +08:00
|
|
|
PKG_VERSION:=1.10.0
|
|
|
|
PKG_RELEASE:=1
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2017-03-22 15:00:40 +08:00
|
|
|
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
|
|
|
|
http://www.tcpdump.org/release/
|
2021-01-05 07:46:42 +08:00
|
|
|
PKG_HASH:=8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e
|
2006-05-24 15:18:36 +08:00
|
|
|
|
2016-06-07 14:58:31 +08:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2021-01-05 07:46:42 +08:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
2012-10-10 20:49:37 +08:00
|
|
|
|
2020-02-22 17:40:26 +08:00
|
|
|
PKG_ASLR_PIE_REGULAR:=1
|
2012-09-15 19:37:01 +08:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2019-10-18 20:10:06 +08:00
|
|
|
|
2006-06-21 10:32:39 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2019-10-18 20:10:06 +08:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
define Package/libpcap
|
2006-09-24 03:29:00 +08:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level packet capture library
|
|
|
|
URL:=http://www.tcpdump.org/
|
2010-04-16 18:03:53 +08:00
|
|
|
MENU:=1
|
2019-01-23 02:17:32 +08:00
|
|
|
ABI_VERSION:=1
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:34:51 +08:00
|
|
|
define Package/libpcap/description
|
2010-03-06 04:24:13 +08:00
|
|
|
This package contains a system-independent library for user-level network packet
|
|
|
|
capture.
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
2009-04-25 11:30:10 +08:00
|
|
|
define Package/libpcap/config
|
2010-04-16 18:03:53 +08:00
|
|
|
source "$(SOURCE)/Config.in"
|
2009-04-25 11:30:10 +08:00
|
|
|
endef
|
|
|
|
|
2019-10-18 20:10:06 +08:00
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DBUILD_WITH_LIBNL=OFF \
|
2021-01-05 07:46:42 +08:00
|
|
|
-DINET6=O$(if $(CONFIG_IPV6),N,FF) \
|
|
|
|
-DPCAP_SUPPORT_NETFILTER=O$(if $(CONFIG_PCAP_HAS_NETFILTER),N,FF)
|
2019-10-18 20:10:06 +08:00
|
|
|
|
|
|
|
# grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
|
|
|
|
CMAKE_OPTIONS += \
|
2021-01-05 07:46:42 +08:00
|
|
|
-DDISABLE_BLUETOOTH=O$(if $(CONFIG_PCAP_HAS_BT),FF,N) \
|
2019-10-18 20:10:06 +08:00
|
|
|
-DDISABLE_DAG=ON \
|
|
|
|
-DDISABLE_DBUS=ON \
|
2021-01-05 07:46:42 +08:00
|
|
|
-DDISABLE_DPDK=ON \
|
|
|
|
-DDISABLE_LINUX_USBMON=O$(if $(CONFIG_PCAP_HAS_USB),FF,N) \
|
2019-10-18 20:10:06 +08: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 09:56:17 +08: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-19 02:30:40 +08:00
|
|
|
define Package/libpcap/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2019-01-23 02:17:32 +08:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libpcap))
|