2010-03-05 20:24:13 +00:00
|
|
|
#
|
2013-04-01 21:07:34 +00:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpcap
|
2018-07-26 14:46:38 +00:00
|
|
|
PKG_VERSION:=1.9.0
|
2013-04-01 21:07:34 +00:00
|
|
|
PKG_RELEASE:=1
|
2006-05-24 07:18:36 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2017-03-22 07:00:40 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
|
|
|
|
http://www.tcpdump.org/release/
|
2018-07-26 14:46:38 +00:00
|
|
|
PKG_HASH:=2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019
|
2015-06-20 17:37:28 +00:00
|
|
|
PKG_FIXUP:=patch-libtool
|
2006-05-24 07:18:36 +00:00
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2012-10-10 12:49:37 +00:00
|
|
|
|
2010-03-05 20:24:13 +00:00
|
|
|
PKG_INSTALL:=1
|
2012-09-15 11:37:01 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
2010-03-05 20:24:13 +00:00
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2009-08-21 22:32:14 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.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
|
|
|
|
URL:=http://www.tcpdump.org/
|
2010-04-16 10:03:53 +00:00
|
|
|
MENU:=1
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 08:34:51 +00:00
|
|
|
define Package/libpcap/description
|
2010-03-05 20:24:13 +00:00
|
|
|
This package contains a system-independent library for user-level network packet
|
|
|
|
capture.
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-25 03:30:10 +00:00
|
|
|
define Package/libpcap/config
|
2010-04-16 10:03:53 +00:00
|
|
|
source "$(SOURCE)/Config.in"
|
2009-04-25 03:30:10 +00:00
|
|
|
endef
|
|
|
|
|
2008-12-19 06:35:23 +00:00
|
|
|
TARGET_CFLAGS += \
|
2010-03-05 20:24:13 +00:00
|
|
|
-ffunction-sections \
|
|
|
|
-fdata-sections
|
2008-08-06 22:10:29 +00:00
|
|
|
|
2009-08-21 22:32:14 +00:00
|
|
|
CONFIGURE_VARS += \
|
2013-04-01 21:07:34 +00:00
|
|
|
ac_cv_linux_vers=$(LINUX_VERSION) \
|
2017-02-20 05:27:41 +00:00
|
|
|
ac_cv_header_libusb_1_0_libusb_h=no
|
2013-04-01 21:07:34 +00:00
|
|
|
|
2017-02-20 05:27:41 +00:00
|
|
|
ifeq ($(CONFIG_PCAP_HAS_NETFILTER),)
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
ac_cv_netfilter_can_compile=no
|
|
|
|
endif
|
2009-08-21 22:32:14 +00:00
|
|
|
|
2007-02-25 23:34:57 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-yydebug \
|
2009-04-25 03:30:10 +00:00
|
|
|
--with-pcap=linux \
|
|
|
|
--without-septel \
|
2012-04-08 15:11:12 +00:00
|
|
|
--without-dag \
|
2013-04-01 21:07:39 +00:00
|
|
|
--without-libnl \
|
2014-02-06 12:40:28 +00:00
|
|
|
--without-snf \
|
|
|
|
--disable-can \
|
|
|
|
--disable-canusb \
|
|
|
|
--disable-dbus \
|
|
|
|
--disable-bluetooth
|
2006-05-24 07:18:36 +00:00
|
|
|
|
2013-10-09 11:03:00 +00:00
|
|
|
ifeq ($(CONFIG_IPV6),y)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-ipv6
|
|
|
|
endif
|
|
|
|
|
2010-03-05 20:24:13 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include"
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default)
|
2009-04-25 03:30:10 +00: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-26 19:35:05 +00:00
|
|
|
$(if $(CONFIG_PCAP_HAS_BT),,$(SED) 's/pcap-bt-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
|
2006-05-24 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2010-03-05 20:24:13 +00: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 07:18:36 +00:00
|
|
|
endef
|
|
|
|
|
2006-06-18 18:30:40 +00:00
|
|
|
define Package/libpcap/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2010-03-05 20:24:13 +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))
|