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
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/cmake.mk
28 define Package
/libpcap
31 TITLE
:=Low-level packet capture library
32 URL
:=http
://www.tcpdump.org
/
37 define Package
/libpcap
/description
38 This package contains a system-independent library for user-level network packet
42 define Package
/libpcap
/config
43 source
"$(SOURCE)/Config.in"
47 -DBUILD_SHARED_LIBS
=ON \
48 -DBUILD_WITH_LIBNL
=OFF \
49 -DINET6
=O
$(if
$(CONFIG_IPV6
),N
,FF
) \
50 -DPCAP_SUPPORT_NETFILTER
=O
$(if
$(CONFIG_PCAP_HAS_NETFILTER
),N
,FF
)
52 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
54 -DDISABLE_BLUETOOTH
=O
$(if
$(CONFIG_PCAP_HAS_BT
),FF
,N
) \
58 -DDISABLE_LINUX_USBMON
=O
$(if
$(CONFIG_PCAP_HAS_USB
),FF
,N
) \
70 define Build
/InstallDev
71 $(call Build
/InstallDev
/cmake
,$(1))
73 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
74 $(1)/usr
/bin
/pcap-config
75 $(INSTALL_DIR
) $(2)/bin
76 $(LN
) ..
/..
/usr
/bin
/pcap-config
$(2)/bin
/pcap-config
79 define Package
/libpcap
/install
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
84 $(eval
$(call BuildPackage
,libpcap
))