2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.tcpdump.org
/release
/
17 PKG_MD5SUM
:=79025766e8027df154cb1f32de8a7974
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/libpcap
25 TITLE
:=Low-level packet capture library
27 This package contains a system-independent library for user-level
\\\
28 network packet capture.
29 URL
:=http
://www.tcpdump.org
/
37 --with-build-cc
="$(HOSTCC)" \
41 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
42 CCOPT
="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
43 DESTDIR
="$(PKG_INSTALL_DIR)" \
47 define Build
/InstallDev
48 mkdir
-p
$(STAGING_DIR
)/usr
/include
49 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcap
{,-bpf
,-namedb
}.h \
50 $(STAGING_DIR
)/usr
/include/
51 mkdir
-p
$(STAGING_DIR
)/usr
/lib
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.
{a
,so
*} \
53 $(STAGING_DIR
)/usr
/lib
/
56 define Build
/UninstallDev
57 rm -rf
$(STAGING_DIR
)/usr
/include/pcap
{,-bpf
,-named
}.h \
58 $(STAGING_DIR
)/usr
/lib
/libpcap.
{a
,so
*}
61 define Package
/libpcap
/install
62 $(INSTALL_DIR
) $(1)/usr
/lib
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
66 $(eval
$(call BuildPackage
,libpcap
))