2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=4b64755bbc8ba1af49c747271a6df5b8
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_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
23 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
24 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/tcpdump
32 TITLE
:=Network monitoring and data acquisition tool
33 DESCRIPTION
:=A tool for network monitoring and data acquisition.
34 URL
:=http
://www.tcpdump.org
/
37 define Build
/Configure
38 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
39 BUILD_CC
=$(TARGET_CC
) HOSTCC
=$(HOSTCC
) \
40 $(TARGET_CONFIGURE_OPTS
) \
41 CFLAGS
="$(TARGET_CFLAGS)" \
42 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
43 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
45 td_cv_buggygetaddrinfo
="no" \
47 --target
=$(GNU_TARGET_NAME
) \
48 --host
=$(GNU_TARGET_NAME
) \
49 --build
=$(GNU_HOST_NAME
) \
55 --datadir=/usr
/share \
56 --includedir=/usr
/include \
57 --infodir=/usr
/share
/info \
59 --libexecdir
=/usr
/lib \
60 --localstatedir
=/var \
61 --mandir=/usr
/share
/man \
65 $(DISABLE_LARGEFILE
) \
74 rm -rf
$(PKG_INSTALL_DIR
)
75 mkdir
-p
$(PKG_INSTALL_DIR
)
76 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
77 CCOPT
="$(TARGET_CFLAGS)" INCLS
="-I. -I$(STAGING_DIR)/usr/include" \
78 DESTDIR
="$(PKG_INSTALL_DIR)" \
82 define Package
/tcpdump
/install
83 install -m0755
-d
$(1)/usr
/sbin
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/tcpdump
$(1)/usr
/sbin
/
87 $(eval
$(call BuildPackage
,tcpdump
))