3 include $(TOPDIR
)/rules.mk
9 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
11 PKG_SOURCE_URL
:=http
://www.tcpdump.org
/release
/
12 PKG_MD5SUM
:=79025766e8027df154cb1f32de8a7974
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/include/package.mk
19 define Package
/libpcap
22 TITLE
:=Low-level packet capture library
23 DESCRIPTION
:=A system-independent library for user-level network packet capture.
24 URL
:=http
://www.tcpdump.org
/
27 define Build
/Configure
28 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS)" \
31 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
32 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
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 \
53 $(DISABLE_LARGEFILE
) \
58 --with-build-cc
=$(HOSTCC
) \
64 rm -rf
$(PKG_INSTALL_DIR
)
65 mkdir
-p
$(PKG_INSTALL_DIR
)
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 CCOPT
="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
68 DESTDIR
="$(PKG_INSTALL_DIR)" \
72 define Build
/InstallDev
73 mkdir
-p
$(STAGING_DIR
)/usr
/include
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcap
{,-bpf
,-namedb
}.h \
75 $(STAGING_DIR
)/usr
/include/
76 mkdir
-p
$(STAGING_DIR
)/usr
/lib
77 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.
{a
,so
*} \
78 $(STAGING_DIR
)/usr
/lib
/
81 define Build
/UninstallDev
82 rm -rf
$(STAGING_DIR
)/usr
/include/pcap
{,-bpf
,-named
}.h \
83 $(STAGING_DIR
)/usr
/lib
/libpcap.
{a
,so
*}
86 define Package
/libpcap
/install
87 install -m0755
-d
$(1)/usr
/lib
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
91 $(eval
$(call BuildPackage
,libpcap
))