6 TCPDUMP_SOURCE
:=tcpdump-
$(TCPDUMP_VERSION
).
tar.gz
7 TCPDUMP_SITE
:=http
://www.tcpdump.org
/release
/
8 TCPDUMP_DIR
:=$(BUILD_DIR
)/tcpdump-
$(TCPDUMP_VERSION
)
11 TCPDUMP_PATCH_DIR
:= $(SOURCE_DIR
)/openwrt
/patches
/tcpdump
13 TCPDUMP_BUILD_DIR
:= $(BUILD_DIR
)/tcpdump_
$(TCPDUMP_VERSION
)-$(TCPDUMP_RELEASE
)
14 TCPDUMP_IPK_DIR
:= $(OPENWRT_IPK_DIR
)/tcpdump
15 TCPDUMP_IPK
:= $(TCPDUMP_BUILD_DIR
)_
$(ARCH
).ipk
18 $(DL_DIR
)/$(TCPDUMP_SOURCE
):
19 $(WGET
) -P
$(DL_DIR
) $(TCPDUMP_SITE
)/$(TCPDUMP_SOURCE
)
22 $(TCPDUMP_DIR
)/.stamp-unpacked
: $(DL_DIR
)/$(TCPDUMP_SOURCE
)
23 $(TCPDUMP_CAT
) $(DL_DIR
)/$(TCPDUMP_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
25 touch
$(TCPDUMP_DIR
)/.stamp-unpacked
28 $(TCPDUMP_DIR
)/.stamp-patched
: $(TCPDUMP_DIR
)/.stamp-unpacked
29 $(SOURCE_DIR
)/patch-kernel.sh
$(TCPDUMP_DIR
) $(TCPDUMP_PATCH_DIR
)
30 $(SOURCE_DIR
)/patch-kernel.sh
$(TCPDUMP_DIR
) $(TCPDUMP_DIR
)/debian
/patches
*patch
32 touch
$(TCPDUMP_DIR
)/.stamp-patched
35 $(TCPDUMP_DIR
)/.stamp-configured
: $(TCPDUMP_DIR
)/.stamp-patched
37 rm -rf config.cache
; \
38 $(TARGET_CONFIGURE_OPTS
) \
39 CFLAGS
="$(TARGET_CFLAGS)" \
40 ac_cv_linux_vers
="2" \
42 --target
=$(GNU_TARGET_NAME
) \
43 --host
=$(GNU_TARGET_NAME
) \
44 --build
=$(GNU_HOST_NAME
) \
49 --libexecdir
=/usr
/lib
/locate \
51 --datadir=/usr
/share \
52 --localstatedir
=/var
/lib \
53 --mandir=/usr
/share
/man \
54 --infodir=/usr
/share
/info \
55 --includedir=/usr
/include \
61 touch
$(TCPDUMP_DIR
)/.stamp-configured
64 $(TCPDUMP_DIR
)/.stamp-built
: $(TCPDUMP_DIR
)/.stamp-configured
68 CCOPT
="$(TARGET_OPTIMIZATION)" \
69 INCLS
="-I. -I$(srcdir)/missing" \
73 touch
$(TCPDUMP_DIR
)/.stamp-built
76 $(TCPDUMP_DIR
)/.stamp-installed
: $(TCPDUMP_DIR
)/.stamp-built
77 mkdir
-p
$(TCPDUMP_BUILD_DIR
)
80 DESTDIR
="$(TCPDUMP_BUILD_DIR)" \
83 rm -rf
$(TCPDUMP_BUILD_DIR
)/usr
/share
85 $(STRIP
) $(TCPDUMP_BUILD_DIR
)/usr
/sbin
/*
87 touch
$(TCPDUMP_DIR
)/.stamp-installed
90 $(TCPDUMP_IPK
): $(TCPDUMP_DIR
)/.stamp-installed
91 cp
-a
$(TCPDUMP_IPK_DIR
)/CONTROL
$(TCPDUMP_BUILD_DIR
)/
92 perl
-pi
-e
"s/^Vers.*:.*$$/Version: $(TCPDUMP_VERSION)-$(TCPDUMP_RELEASE)/" $(TCPDUMP_BUILD_DIR
)/CONTROL
/control
93 perl
-pi
-e
"s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(TCPDUMP_BUILD_DIR
)/CONTROL
/control
94 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(TCPDUMP_BUILD_DIR
)
97 tcpdump-source
: $(DL_DIR
)/$(TCPDUMP_SOURCE
)
99 # libpcap-clean prevent configure to find a local libpcap library
100 tcpdump-ipk
: ipkg-utils libpcap-ipk libpcap-clean
$(TCPDUMP_IPK
)
103 $(MAKE
) -C
$(TCPDUMP_DIR
) clean
106 rm -rf
$(TCPDUMP_DIR
)
107 rm -rf
$(TCPDUMP_BUILD_DIR
)
108 rm -rf
$(TCPDUMP_IPK
)