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
:=https
://www.tcpdump.org
/release
/
16 PKG_HASH
:=ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=LICENSE
22 PKG_ASLR_PIE_REGULAR
:=1
24 PKG_CONFIG_DEPENDS
:= CONFIG_PACKAGE_rpcapd
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"
50 TITLE
:=Capture daemon to be controlled by a remote libpcap application
51 URL
:=http
://www.tcpdump.org
/
55 ifdef CONFIG_PACKAGE_rpcapd
61 -DBUILD_SHARED_LIBS
=ON \
62 -DBUILD_WITH_LIBNL
=OFF \
63 -DINET6
=O
$(if
$(CONFIG_IPV6
),N
,FF
) \
64 -DPCAP_SUPPORT_NETFILTER
=O
$(if
$(CONFIG_PCAP_HAS_NETFILTER
),N
,FF
)
66 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
68 -DDISABLE_BLUETOOTH
=O
$(if
$(CONFIG_PCAP_HAS_BT
),FF
,N
) \
72 -DDISABLE_LINUX_USBMON
=O
$(if
$(CONFIG_PCAP_HAS_USB
),FF
,N
) \
84 define Build
/InstallDev
85 $(call Build
/InstallDev
/cmake
,$(1))
87 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
88 $(1)/usr
/bin
/pcap-config
89 $(INSTALL_DIR
) $(2)/bin
90 $(LN
) ..
/..
/usr
/bin
/pcap-config
$(2)/bin
/pcap-config
93 define Package
/libpcap
/install
94 $(INSTALL_DIR
) $(1)/usr
/lib
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
98 define Package
/rpcapd
/install
99 $(INSTALL_DIR
) $(1)/usr
/sbin
100 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rpcapd
$(1)/usr
/sbin
/
103 $(eval
$(call BuildPackage
,libpcap
))
104 $(eval
$(call BuildPackage
,rpcapd
))