a5dfb2698b717d55dc07de0c9e52467cf61f31f0
[openwrt/svn-archive/archive.git] / net / tcpdump / Makefile
1 #
2 # Copyright (C) 2006 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.4
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:=4b64755bbc8ba1af49c747271a6df5b8
21 PKG_CAT:=zcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/tcpdump
29 SECTION:=net
30 CATEGORY:=Network
31 DEPENDS:=+libpcap
32 TITLE:=Network monitoring and data acquisition tool
33 URL:=http://www.tcpdump.org/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-ipv6 \
39 --without-crypto \
40 , \
41 BUILD_CC="$(TARGET_CC)" \
42 HOSTCC="$(HOSTCC)" \
43 td_cv_buggygetaddrinfo="no" \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include" \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 all install
52 endef
53
54 define Package/tcpdump/install
55 install -m0755 -d $(1)/usr/sbin
56 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/
57 endef
58
59 $(eval $(call BuildPackage,tcpdump))