Convert tcpdump to new packaging style
[openwrt.git] / package / tcpdump / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=tcpdump
6 PKG_VERSION:=3.8.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=30645001f4b97019677cad88d3811904
9
10 PKG_SOURCE_URL:= \
11 http://www.tcpdump.org/release \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,TCPDUMP,tcpdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
24 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
25 BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
29 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
30 ac_cv_linux_vers=$(LINUX_VERSION) \
31 td_cv_buggygetaddrinfo="no" \
32 ./configure \
33 --target=$(GNU_TARGET_NAME) \
34 --host=$(GNU_TARGET_NAME) \
35 --build=$(GNU_HOST_NAME) \
36 --program-prefix="" \
37 --program-suffix="" \
38 --prefix=/usr \
39 --exec-prefix=/usr \
40 --bindir=/usr/bin \
41 --datadir=/usr/share \
42 --includedir=/usr/include \
43 --infodir=/usr/share/info \
44 --libdir=/usr/lib \
45 --libexecdir=/usr/lib \
46 --localstatedir=/var \
47 --mandir=/usr/share/man \
48 --sbindir=/usr/sbin \
49 --sysconfdir=/etc \
50 $(DISABLE_NLS) \
51 $(DISABLE_LARGEFILE) \
52 --enable-shared \
53 --disable-static \
54 --enable-ipv6 \
55 --without-crypto \
56 );
57 touch $(PKG_BUILD_DIR)/.configured
58
59 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include"
62 mkdir -p $(PKG_INSTALL_DIR)
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 install
66 touch $(PKG_BUILD_DIR)/.built
67
68 $(IPKG_TCPDUMP):
69 install -m0755 -d $(IDIR_TCPDUMP)/usr/sbin
70 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(IDIR_TCPDUMP)/usr/sbin/
71 $(RSTRIP) $(IDIR_TCPDUMP)
72 $(IPKG_BUILD) $(IDIR_TCPDUMP) $(PACKAGE_DIR)
This page took 0.045983 seconds and 5 git commands to generate.