3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= 56a9d4615d8354fcfe8cff8c8443c77b
10 PKG_SOURCE_SITE
:= http
://www.tcpdump.org
/release
11 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_CAT
:= zcat
13 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
15 PKG_IPK
:= $(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
18 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
22 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
23 mkdir
-p
$(TOOL_BUILD_DIR
)
24 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
25 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
26 touch
$(PKG_BUILD_DIR
)/.patched
28 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
29 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
30 ac_cv_linux_vers
=$(BR2_DEFAULT_KERNEL_HEADERS
) \
31 BUILD_CC
=$(TARGET_CC
) HOSTCC
=$(HOSTCC
) \
32 $(TARGET_CONFIGURE_OPTS
) \
33 CFLAGS
="$(TARGET_CFLAGS)" \
35 --target
=$(GNU_TARGET_NAME
) \
36 --host
=$(GNU_TARGET_NAME
) \
37 --build
=$(GNU_HOST_NAME
) \
43 --datadir=/usr
/share \
44 --includedir=/usr
/include \
45 --infodir=/usr
/share
/info \
47 --libexecdir
=/usr
/lib \
48 --localstatedir
=/var \
49 --mandir=/usr
/share
/man \
55 --with-build-cc
=$(HOSTCC
) \
58 touch
$(PKG_BUILD_DIR
)/.configured
60 $(PKG_BUILD_DIR
)/libpcap.a
: $(PKG_BUILD_DIR
)/.configured
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 $(TARGET_CONFIGURE_OPTS
) \
63 CCOPT
="$(TARGET_CFLAGS)" \
65 $(STAGING_DIR
)/usr
/lib
/libpcap.a
: $(PKG_BUILD_DIR
)/libpcap.a
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 DESTDIR
="$(STAGING_DIR)" \
70 $(PKG_IPK
): $(STAGING_DIR
)/usr
/lib
/libpcap.a
71 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) .
/ipkg
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
72 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
73 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/libpcap.so.
* $(PKG_IPK_DIR
)/usr
/lib
/
74 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
75 mkdir
-p
$(PACKAGE_DIR
)
76 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
78 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
79 $(IPKG
) install $(PKG_IPK
)
81 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
82 prepare
: $(PKG_BUILD_DIR
)/.patched
83 compile
: $(STAGING_DIR
)/usr
/lib
/libpcap.a
$(PKG_IPK
)
84 install: $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
87 -$(MAKE
) -C
$(PKG_BUILD_DIR
) \
88 DESTDIR
="$(STAGING_DIR)" \
90 rm -rf
$(PKG_BUILD_DIR
)