2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
16 http://www.tcpdump.org/release/
17 PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
24 PKG_LICENSE:=BSD-3-Clause
25 PKG_LICENSE_FILES:=LICENSE
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
30 define Package/libpcap
33 TITLE:=Low-level packet capture library
34 URL:=http://www.tcpdump.org/
39 define Package/libpcap/description
40 This package contains a system-independent library for user-level network packet
44 define Package/libpcap/config
45 source "$(SOURCE)/Config.in"
49 -DBUILD_SHARED_LIBS=ON \
50 -DBUILD_WITH_LIBNL=OFF \
52 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
67 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB) ,,-DDISABLE_USB=ON)
68 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT) ,,-DDISABLE_BLUETOOTH=ON)
69 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
71 CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
73 define Package/libpcap/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
78 $(eval $(call BuildPackage,libpcap))