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
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 include $(TOPDIR
)/package
/rules.mk
21 $(eval
$(call PKG_template
,LIBPCAP
,libpcap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
23 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
24 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
25 $(TARGET_CONFIGURE_OPTS
) \
26 CFLAGS
="$(TARGET_CFLAGS)" \
27 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
28 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
29 ac_cv_linux_vers
=$(BR2_DEFAULT_KERNEL_HEADERS
) \
31 --target
=$(GNU_TARGET_NAME
) \
32 --host
=$(GNU_TARGET_NAME
) \
33 --build
=$(GNU_HOST_NAME
) \
39 --datadir=/usr
/share \
40 --includedir=/usr
/include \
41 --infodir=/usr
/share
/info \
43 --libexecdir
=/usr
/lib \
44 --localstatedir
=/var \
45 --mandir=/usr
/share
/man \
49 $(DISABLE_LARGEFILE
) \
53 --with-build-cc
=$(HOSTCC
) \
56 touch
$(PKG_BUILD_DIR
)/.configured
58 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
59 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
60 CCOPT
="$(TARGET_CFLAGS)"
61 mkdir
-p
$(PKG_INSTALL_DIR
)
62 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
63 DESTDIR
="$(PKG_INSTALL_DIR)" \
65 touch
$(PKG_BUILD_DIR
)/.built
68 install -m0755
-d
$(IDIR_LIBPCAP
)/usr
/lib
69 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(IDIR_LIBPCAP
)/usr
/lib
/
70 $(RSTRIP
) $(IDIR_LIBPCAP
)
71 $(IPKG_BUILD
) $(IDIR_LIBPCAP
) $(PACKAGE_DIR
)
73 $(STAGING_DIR
)/usr
/lib
/libpcap.so
: $(PKG_BUILD_DIR
)/.built
74 mkdir
-p
$(STAGING_DIR
)/usr
/include
75 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/pcap
* $(STAGING_DIR
)/usr
/include/
76 mkdir
-p
$(I_LIBPCAP_DEV
)/usr
/lib
77 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
79 install-dev
: $(STAGING_DIR
)/usr
/lib
/libpcap.so
82 rm -rf
$(STAGING_DIR
)/usr
/include/pcap
*
83 rm -rf
$(STAGING_DIR
)/usr
/lib
/libpcap.
{a
,so
*}