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 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libpcap
28 TITLE
:=Low-level packet capture library
30 This package contains a system-independent library for user-level
\\\
31 network packet capture.
32 URL
:=http
://www.tcpdump.org
/
40 --with-build-cc
="$(HOSTCC)" \
44 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
45 CCOPT
="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
46 DESTDIR
="$(PKG_INSTALL_DIR)" \
50 define Build
/InstallDev
51 mkdir
-p
$(STAGING_DIR
)/usr
/include
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcap
{,-bpf
,-namedb
}.h \
53 $(STAGING_DIR
)/usr
/include/
54 mkdir
-p
$(STAGING_DIR
)/usr
/lib
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.
{a
,so
*} \
56 $(STAGING_DIR
)/usr
/lib
/
59 define Build
/UninstallDev
60 rm -rf
$(STAGING_DIR
)/usr
/include/pcap
{,-bpf
,-named
}.h \
61 $(STAGING_DIR
)/usr
/lib
/libpcap.
{a
,so
*}
64 define Package
/libpcap
/install
65 $(INSTALL_DIR
) $(1)/usr
/lib
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcap.so.
* $(1)/usr
/lib
/
69 $(eval
$(call BuildPackage
,libpcap
))