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
12 PKG_RELEASE
:=$(AUTORELEASE
)
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
:=ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4
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"
49 TITLE
:=Capture daemon to be controlled by a remote libpcap application
50 URL
:=http
://www.tcpdump.org
/
54 ifdef CONFIG_PACKAGE_rpcapd
60 -DBUILD_SHARED_LIBS
=ON \
61 -DBUILD_WITH_LIBNL
=OFF \
62 -DINET6
=O
$(if
$(CONFIG_IPV6
),N
,FF
) \
63 -DPCAP_SUPPORT_NETFILTER
=O
$(if
$(CONFIG_PCAP_HAS_NETFILTER
),N
,FF
)
65 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
67 -DDISABLE_BLUETOOTH
=O
$(if
$(CONFIG_PCAP_HAS_BT
),FF
,N
) \
71 -DDISABLE_LINUX_USBMON
=O
$(if
$(CONFIG_PCAP_HAS_USB
),FF
,N
) \
83 define Build
/InstallDev
84 $(call Build
/InstallDev
/cmake
,$(1))
86 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
87 $(1)/usr
/bin
/pcap-config
88 $(INSTALL_DIR
) $(2)/bin
89 $(LN
) ..
/..
/usr
/bin
/pcap-config
$(2)/bin
/pcap-config
92 define Package
/libpcap
/install
93 $(INSTALL_DIR
) $(1)/usr
/lib
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
97 define Package
/rpcapd
/install
98 $(INSTALL_DIR
) $(1)/usr
/sbin
99 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rpcapd
$(1)/usr
/sbin
/
102 $(eval
$(call BuildPackage
,libpcap
))
103 $(eval
$(call BuildPackage
,rpcapd
))