2 # Copyright (C) 2007-2011 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:=798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
23 PKG_LICENSE:=BSD-3-Clause
27 include $(INCLUDE_DIR)/package.mk
29 define Package/tcpdump/default
33 TITLE:=Network monitoring and data acquisition tool
34 URL:=http://www.tcpdump.org/
37 define Package/tcpdump
38 $(Package/tcpdump/default)
42 define Package/tcpdump-mini
43 $(Package/tcpdump/default)
44 TITLE+= (minimal version)
51 ifeq ($(CONFIG_IPV6),y)
56 TARGET_CFLAGS += -ffunction-sections -fdata-sections
57 TARGET_LDFLAGS += -Wl,--gc-sections
60 BUILD_CC="$(TARGET_CC)" \
62 td_cv_buggygetaddrinfo="no" \
63 ac_cv_linux_vers=$(LINUX_VERSION) \
64 ac_cv_header_rpc_rpcent_h=no \
65 ac_cv_lib_rpc_main=no \
66 ac_cv_path_PCAP_CONFIG=""
70 ifeq ($(BUILD_VARIANT),mini)
71 TARGET_CFLAGS += -DTCPDUMP_MINI
72 CONFIGURE_ARGS += --disable-smb
73 MAKE_FLAGS += TCPDUMP_MINI=1
77 CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)"
79 define Package/tcpdump/install
80 $(INSTALL_DIR) $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/
84 Package/tcpdump-mini/install = $(Package/tcpdump/install)
86 $(eval $(call BuildPackage,tcpdump))
87 $(eval $(call BuildPackage,tcpdump-mini))