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
:=8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e
19 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
20 PKG_LICENSE
:=BSD-3-Clause
21 PKG_LICENSE_FILES
:=LICENSE
23 PKG_ASLR_PIE_REGULAR
:=1
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/cmake.mk
29 define Package
/libpcap
32 TITLE
:=Low-level packet capture library
33 URL
:=http
://www.tcpdump.org
/
38 define Package
/libpcap
/description
39 This package contains a system-independent library for user-level network packet
43 define Package
/libpcap
/config
44 source
"$(SOURCE)/Config.in"
48 -DBUILD_SHARED_LIBS
=ON \
49 -DBUILD_WITH_LIBNL
=OFF \
50 -DINET6
=O
$(if
$(CONFIG_IPV6
),N
,FF
) \
51 -DPCAP_SUPPORT_NETFILTER
=O
$(if
$(CONFIG_PCAP_HAS_NETFILTER
),N
,FF
)
53 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
55 -DDISABLE_BLUETOOTH
=O
$(if
$(CONFIG_PCAP_HAS_BT
),FF
,N
) \
59 -DDISABLE_LINUX_USBMON
=O
$(if
$(CONFIG_PCAP_HAS_USB
),FF
,N
) \
71 define Build
/InstallDev
72 $(call Build
/InstallDev
/cmake
,$(1))
74 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
75 $(1)/usr
/bin
/pcap-config
76 $(INSTALL_DIR
) $(2)/bin
77 $(LN
) ..
/..
/usr
/bin
/pcap-config
$(2)/bin
/pcap-config
80 define Package
/libpcap
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
85 $(eval
$(call BuildPackage
,libpcap
))