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
)/package
/rules.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 Package
/libpcap
/install
73 install -m0755
-d
$(1)/usr
/lib
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
77 define Build
/InstallDev
78 mkdir
-p
$(STAGING_DIR
)/usr
/include
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcap.h \
80 $(PKG_INSTALL_DIR
)/usr
/include/pcap-bpf.h \
81 $(PKG_INSTALL_DIR
)/usr
/include/pcap-namedb.h \
82 $(STAGING_DIR
)/usr
/include/
83 mkdir
-p
$(STAGING_DIR
)/usr
/lib
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.a \
85 $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so
* \
86 $(STAGING_DIR
)/usr
/lib
/
89 define Build
/UninstallDev
90 rm -rf
$(STAGING_DIR
)/usr
/include/pcap.h \
91 $(STAGING_DIR
)/usr
/include/pcap-bpf.h \
92 $(STAGING_DIR
)/usr
/include/pcap-namedb.h \
93 $(STAGING_DIR
)/usr
/lib
/libpcap.a \
94 $(STAGING_DIR
)/usr
/lib
/libpcap.so
*
97 $(eval
$(call BuildPackage
,libpcap
))