2010-03-06 04:24:13 +08:00
|
|
|
#
|
2013-04-02 05:07:34 +08:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 08:35:46 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpcap
|
2014-02-05 17:54:34 +08:00
|
|
|
PKG_VERSION:=1.5.3
|
2013-04-02 05:07:34 +08:00
|
|
|
PKG_RELEASE:=1
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
2014-02-05 17:54:34 +08:00
|
|
|
PKG_MD5SUM:=7e7321fb3aff2f2bb05c8229f3795d4a
|
2015-06-21 01:37:28 +08:00
|
|
|
PKG_FIXUP:=patch-libtool
|
2006-05-24 15:18:36 +08:00
|
|
|
|
2012-10-10 20:49:37 +08:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
2010-03-06 04:24:13 +08:00
|
|
|
PKG_INSTALL:=1
|
2012-09-15 19:37:01 +08:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2014-11-02 20:20:54 +08:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
2010-03-06 04:24:13 +08:00
|
|
|
|
2006-06-21 10:32:39 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2009-08-22 06:32:14 +08:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2006-05-24 15:18:36 +08:00
|
|
|
|
|
|
|
define Package/libpcap
|
2006-09-24 03:29:00 +08:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level packet capture library
|
|
|
|
URL:=http://www.tcpdump.org/
|
2010-04-16 18:03:53 +08:00
|
|
|
MENU:=1
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:34:51 +08:00
|
|
|
define Package/libpcap/description
|
2010-03-06 04:24:13 +08:00
|
|
|
This package contains a system-independent library for user-level network packet
|
|
|
|
capture.
|
2007-09-07 16:34:51 +08:00
|
|
|
endef
|
|
|
|
|
2009-04-25 11:30:10 +08:00
|
|
|
define Package/libpcap/config
|
2010-04-16 18:03:53 +08:00
|
|
|
source "$(SOURCE)/Config.in"
|
2009-04-25 11:30:10 +08:00
|
|
|
endef
|
|
|
|
|
2008-12-19 14:35:23 +08:00
|
|
|
TARGET_CFLAGS += \
|
2010-03-06 04:24:13 +08:00
|
|
|
-ffunction-sections \
|
|
|
|
-fdata-sections
|
2008-08-07 06:10:29 +08:00
|
|
|
|
2009-08-22 06:32:14 +08:00
|
|
|
CONFIGURE_VARS += \
|
2013-04-02 05:07:34 +08:00
|
|
|
ac_cv_linux_vers=$(LINUX_VERSION) \
|
2013-04-02 05:07:39 +08:00
|
|
|
ac_cv_header_libusb_1_0_libusb_h=no \
|
|
|
|
ac_cv_netfilter_can_compile=no
|
2013-04-02 05:07:34 +08:00
|
|
|
|
2009-08-22 06:32:14 +08:00
|
|
|
|
2007-02-26 07:34:57 +08:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-yydebug \
|
|
|
|
--with-build-cc="$(HOSTCC)" \
|
2009-04-25 11:30:10 +08:00
|
|
|
--with-pcap=linux \
|
|
|
|
--without-septel \
|
2012-04-08 23:11:12 +08:00
|
|
|
--without-dag \
|
2013-04-02 05:07:39 +08:00
|
|
|
--without-libnl \
|
2014-02-06 20:40:28 +08:00
|
|
|
--without-snf \
|
|
|
|
--disable-can \
|
|
|
|
--disable-canusb \
|
|
|
|
--disable-dbus \
|
|
|
|
--disable-bluetooth
|
2006-05-24 15:18:36 +08:00
|
|
|
|
2013-10-09 19:03:00 +08:00
|
|
|
ifeq ($(CONFIG_IPV6),y)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-ipv6
|
|
|
|
endif
|
|
|
|
|
2010-03-06 04:24:13 +08:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include"
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default)
|
2009-04-25 11:30:10 +08:00
|
|
|
$(if $(CONFIG_PCAP_HAS_USB),,$(SED) '/^#define PCAP_SUPPORT_USB/D' $(PKG_BUILD_DIR)/config.h)
|
|
|
|
$(if $(CONFIG_PCAP_HAS_USB),,$(SED) 's/pcap-usb-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
|
|
|
|
$(if $(CONFIG_PCAP_HAS_BT),,$(SED) '/^#define PCAP_SUPPORT_BT/D' $(PKG_BUILD_DIR)/config.h)
|
2009-04-27 03:35:05 +08:00
|
|
|
$(if $(CONFIG_PCAP_HAS_BT),,$(SED) 's/pcap-bt-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2010-03-06 04:24:13 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/pcap* $(1)/usr/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(1)/usr/lib/
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
2006-06-19 02:30:40 +08:00
|
|
|
define Package/libpcap/install
|
2006-11-23 08:29:07 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2010-03-06 04:24:13 +08:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* $(1)/usr/lib/
|
2006-05-24 15:18:36 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libpcap))
|