add arpwatch depend on libpcap
[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:=http://www.tcpdump.org/release
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_CAT:=zcat
14 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
16
17 $(DL_DIR)/$(PKG_SOURCE):
18 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
19
20 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
21 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 touch $(PKG_BUILD_DIR)/.unpacked
23
24 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
25 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
26 ac_cv_linux_vers=$(LINUX_VERSION) \
27 BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS)" \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --with-build-cc=$(HOSTCC) \
35 --prefix=$(STAGING_DIR) \
36 --libdir=$(STAGING_DIR)/lib \
37 --includedir=$(STAGING_DIR)/include \
38 );
39 touch $(PKG_BUILD_DIR)/.configured
40
41 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
42 $(MAKE) \
43 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
44 LIBS="-lpcap" \
45 INCLS="-I. -I$(STAGING_DIR)/usr/include" \
46 -C $(PKG_BUILD_DIR)
47
48 $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
49 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
50 mkdir -p $(PKG_IPK_DIR)/usr/sbin
51 cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_IPK_DIR)/usr/sbin/
52 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
53 mkdir -p $(PACKAGE_DIR)
54 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
55
56 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
57 $(IPKG) install $(PKG_IPK)
58
59 source: $(DL_DIR)/$(PKG_SOURCE)
60 prepare: $(PKG_BUILD_DIR)/.unpacked
61 compile: $(PKG_IPK)
62 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
63
64 clean:
65 rm -rf $(PKG_BUILD_DIR)
66 rm -f $(PKG_IPK)
This page took 0.042547 seconds and 5 git commands to generate.