2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-05-24 07:18:36 +00:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpcap
|
|
|
|
PKG_VERSION:=0.9.4
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
|
|
|
PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974
|
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
define Package/libpcap
|
2006-09-23 19:29:00 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level packet capture library
|
|
|
|
DESCRIPTION:=\
|
|
|
|
This package contains a system-independent library for user-level \\\
|
|
|
|
network packet capture.
|
|
|
|
URL:=http://www.tcpdump.org/
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
2007-02-25 23:34:57 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-yydebug \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--with-build-cc="$(HOSTCC)" \
|
|
|
|
--with-pcap=linux
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/pcap{,-bpf,-namedb}.h \
|
2006-05-24 07:18:36 +00:00
|
|
|
$(STAGING_DIR)/usr/include/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \
|
2006-05-24 07:18:36 +00:00
|
|
|
$(STAGING_DIR)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2007-03-23 08:11:08 +00:00
|
|
|
rm -rf $(STAGING_DIR)/usr/include/pcap{,-bpf,-namedb}.h \
|
2006-06-18 18:30:40 +00:00
|
|
|
$(STAGING_DIR)/usr/lib/libpcap.{a,so*}
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libpcap/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libpcap))
|