2012-10-10 12:35:26 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007-2011 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=tcpdump
|
2017-09-10 19:27:26 +00:00
|
|
|
PKG_VERSION:=4.9.2
|
2016-12-10 10:10:03 +00:00
|
|
|
PKG_RELEASE:=1
|
2012-10-10 12:35:26 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2017-03-22 07:01:04 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
|
|
|
|
http://www.tcpdump.org/release/
|
2017-09-10 19:27:26 +00:00
|
|
|
PKG_HASH:=798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79
|
2012-10-10 12:35:26 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:tcpdump:tcpdump
|
2012-10-10 12:35:26 +00:00
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/tcpdump/default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
DEPENDS:=+libpcap
|
|
|
|
TITLE:=Network monitoring and data acquisition tool
|
|
|
|
URL:=http://www.tcpdump.org/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tcpdump
|
|
|
|
$(Package/tcpdump/default)
|
|
|
|
VARIANT:=full
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/tcpdump-mini
|
|
|
|
$(Package/tcpdump/default)
|
|
|
|
TITLE+= (minimal version)
|
|
|
|
VARIANT:=mini
|
|
|
|
endef
|
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
2018-07-30 20:23:48 +00:00
|
|
|
--without-cap-ng \
|
2012-10-10 12:35:26 +00:00
|
|
|
--without-crypto
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_IPV6),y)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-ipv6
|
|
|
|
endif
|
|
|
|
|
2013-01-22 07:51:15 +00:00
|
|
|
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
TARGET_LDFLAGS += -Wl,--gc-sections
|
|
|
|
|
2012-10-10 12:35:26 +00:00
|
|
|
CONFIGURE_VARS += \
|
|
|
|
BUILD_CC="$(TARGET_CC)" \
|
|
|
|
HOSTCC="$(HOSTCC)" \
|
|
|
|
td_cv_buggygetaddrinfo="no" \
|
|
|
|
ac_cv_linux_vers=$(LINUX_VERSION) \
|
|
|
|
ac_cv_header_rpc_rpcent_h=no \
|
|
|
|
ac_cv_lib_rpc_main=no \
|
|
|
|
ac_cv_path_PCAP_CONFIG=""
|
|
|
|
|
|
|
|
MAKE_FLAGS :=
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),mini)
|
|
|
|
TARGET_CFLAGS += -DTCPDUMP_MINI
|
|
|
|
CONFIGURE_ARGS += --disable-smb
|
|
|
|
MAKE_FLAGS += TCPDUMP_MINI=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
MAKE_FLAGS += \
|
|
|
|
CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)"
|
|
|
|
|
|
|
|
define Package/tcpdump/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
Package/tcpdump-mini/install = $(Package/tcpdump/install)
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,tcpdump))
|
|
|
|
$(eval $(call BuildPackage,tcpdump-mini))
|