a733bb862f322761c0e5639a629e8476aec63176
[packages.git] / net / tcpdump / Makefile
1
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=tcpdump
12 PKG_VERSION:=3.9.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \
17         http://ftp.gwdg.de/pub/misc/tcpdump/ \
18         http://www.at.tcpdump.org/ \
19         http://www.br.tcpdump.org/
20 PKG_MD5SUM:=c491a78c52fe73f1f7271aa5d8c6ab2e
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/tcpdump
25   SECTION:=net
26   CATEGORY:=Network
27   DEPENDS:=+libpcap
28   TITLE:=Network monitoring and data acquisition tool
29   URL:=http://www.tcpdump.org/
30 endef
31
32 define Build/Configure
33         $(call Build/Configure/Default, \
34                 --enable-ipv6 \
35                 --without-crypto \
36                 , \
37                 BUILD_CC="$(TARGET_CC)" \
38                 HOSTCC="$(HOSTCC)" \
39                 td_cv_buggygetaddrinfo="no" \
40         )
41 endef
42
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include" \
46                 DESTDIR="$(PKG_INSTALL_DIR)" \
47                 all install
48 endef
49
50 define Package/tcpdump/install
51         $(INSTALL_DIR) $(1)/usr/sbin
52         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/
53 endef
54
55 $(eval $(call BuildPackage,tcpdump))