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-01-04 23:46:42 +00:00
|
|
|
PKG_VERSION:=1.10.0
|
|
|
|
PKG_RELEASE:=1
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2017-03-22 07:00:40 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
|
|
|
|
http://www.tcpdump.org/release/
|
2021-01-04 23:46:42 +00:00
|
|
|
PKG_HASH:=8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e
|
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
|
2012-09-15 11:37:01 +00:00
|
|
|
PKG_BUILD_PARALLEL:=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
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libpcap))
|