3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=56a9d4615d8354fcfe8cff8c8443c77b
11 http
://www.tcpdump.org
/release \
12 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 IPKG_LIBPCAP
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 IDIR_LIBPCAP
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
20 INFO_LIBPCAP
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
25 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
26 mkdir
-p
$(BUILD_DIR
)/$(PKG_NAME
)
27 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
)/$(PKG_NAME
) $(TAR_OPTIONS
) -
28 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
29 touch
$(PKG_BUILD_DIR
)/.prepared
31 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
32 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache config.status
; \
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
=$(BR2_DEFAULT_KERNEL_HEADERS
) \
39 --target
=$(GNU_TARGET_NAME
) \
40 --host
=$(GNU_TARGET_NAME
) \
41 --build
=$(GNU_HOST_NAME
) \
47 --datadir=/usr
/share \
48 --includedir=/usr
/include \
49 --infodir=/usr
/share
/info \
51 --libexecdir
=/usr
/lib \
52 --localstatedir
=/var \
53 --mandir=/usr
/share
/man \
57 $(DISABLE_LARGEFILE
) \
61 --with-build-cc
=$(HOSTCC
) \
64 touch
$(PKG_BUILD_DIR
)/.configured
66 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
67 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
68 CCOPT
="$(TARGET_CFLAGS)"
69 touch
$(PKG_BUILD_DIR
)/.built
71 $(STAGING_DIR
)/usr
/lib
/libpcap.so
: $(PKG_BUILD_DIR
)/.built
72 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
73 DESTDIR
="$(STAGING_DIR)" \
76 $(IPKG_LIBPCAP
): $(STAGING_DIR
)/usr
/lib
/libpcap.so
77 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBPCAP
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
78 mkdir
-p
$(IDIR_LIBPCAP
)/usr
/lib
79 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/libpcap.so.
* $(IDIR_LIBPCAP
)/usr
/lib
/
80 $(STRIP
) $(IDIR_LIBPCAP
)/usr
/lib
/lib
*.so
*
81 mkdir
-p
$(PACKAGE_DIR
)
82 $(IPKG_BUILD
) $(IDIR_LIBPCAP
) $(PACKAGE_DIR
)
84 $(INFO_LIBPCAP
): $(IPKG_LIBPCAP
)
85 $(IPKG
) install $(IPKG_LIBPCAP
)
87 source
: $(DL_DIR
)/$(PKG_SOURCE
)
88 prepare
: $(PKG_BUILD_DIR
)/.prepared
89 compile
: $(IPKG_LIBPCAP
)
90 install: $(INFO_LIBPCAP
)
93 -$(MAKE
) -C
$(PKG_BUILD_DIR
) \
94 DESTDIR
="$(STAGING_DIR)" \
96 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LIBPCAP
)