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