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>
22 PKG_ASLR_PIE_REGULAR:=1
25 PKG_LICENSE:=BSD-3-Clause
26 PKG_LICENSE_FILES:=LICENSE
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/cmake.mk
31 define Package/libpcap
34 TITLE:=Low-level packet capture library
35 URL:=http://www.tcpdump.org/
40 define Package/libpcap/description
41 This package contains a system-independent library for user-level network packet
45 define Package/libpcap/config
46 source "$(SOURCE)/Config.in"
50 -DBUILD_SHARED_LIBS=ON \
51 -DBUILD_WITH_LIBNL=OFF \
53 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
68 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB) ,,-DDISABLE_USB=ON)
69 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT) ,,-DDISABLE_BLUETOOTH=ON)
70 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
72 CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
74 define Package/libpcap/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
79 $(eval $(call BuildPackage,libpcap))