use pdc ide chipset as primary ide controller
[openwrt.git] / openwrt / 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
18 IPKG_TCPDUMP:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19 IDIR_TCPDUMP:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
20 INFO_TCPDUMP:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
21
22 $(DL_DIR)/$(PKG_SOURCE):
23 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
24
25 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
26 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
27 $(PATCH) $(PKG_BUILD_DIR) ./patches
28 touch $(PKG_BUILD_DIR)/.prepared
29
30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
31 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
32 BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 ac_cv_linux_vers=$(LINUX_VERSION) \
38 td_cv_buggygetaddrinfo="no" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --program-prefix="" \
44 --program-suffix="" \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --datadir=/usr/share \
49 --includedir=/usr/include \
50 --infodir=/usr/share/info \
51 --libdir=/usr/lib \
52 --libexecdir=/usr/lib \
53 --localstatedir=/var \
54 --mandir=/usr/share/man \
55 --sbindir=/usr/sbin \
56 --sysconfdir=/etc \
57 $(DISABLE_NLS) \
58 $(DISABLE_LARGEFILE) \
59 --enable-shared \
60 --disable-static \
61 --enable-ipv6 \
62 --without-crypto \
63 );
64 touch $(PKG_BUILD_DIR)/.configured
65
66 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include"
69
70 $(IPKG_TCPDUMP): $(PKG_BUILD_DIR)/$(PKG_NAME)
71 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_TCPDUMP) ./ipkg/$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
72 install -m0755 -d $(IDIR_TCPDUMP)/usr/sbin
73 install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_TCPDUMP)/usr/sbin/
74 $(RSTRIP) $(IDIR_TCPDUMP)
75 mkdir -p $(PACKAGE_DIR)
76 $(IPKG_BUILD) $(IDIR_TCPDUMP) $(PACKAGE_DIR)
77
78 $(INFO_TCPDUMP): $(IPKG_TCPDUMP)
79 $(IPKG) install $(IPKG_TCPDUMP)
80
81 source: $(DL_DIR)/$(PKG_SOURCE)
82 prepare: $(PKG_BUILD_DIR)/.prepared
83 compile: $(IPKG_TCPDUMP)
84 install: $(INFO_TCPDUMP)
85
86 clean:
87 rm -rf $(PKG_BUILD_DIR)
88 rm -rf $(IPKG_TCPDUMP)
This page took 0.049031 seconds and 5 git commands to generate.