Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #
  2. # Copyright (C) 2006-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libpcap
  9. PKG_VERSION:=1.9.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
  13. http://www.tcpdump.org/release/
  14. PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
  15. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  16. CMAKE_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_LICENSE:=BSD-3-Clause
  19. PKG_LICENSE_FILES:=LICENSE
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libpcap
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Low-level packet capture library
  26. URL:=http://www.tcpdump.org/
  27. MENU:=1
  28. ABI_VERSION:=1
  29. endef
  30. define Package/libpcap/description
  31. This package contains a system-independent library for user-level network packet
  32. capture.
  33. endef
  34. define Package/libpcap/config
  35. source "$(SOURCE)/Config.in"
  36. endef
  37. CMAKE_OPTIONS += \
  38. -DBUILD_SHARED_LIBS=ON \
  39. -DBUILD_WITH_LIBNL=OFF \
  40. # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
  41. CMAKE_OPTIONS += \
  42. -DDISABLE_DAG=ON \
  43. -DDISABLE_DBUS=ON \
  44. -DDISABLE_NETMAP=ON \
  45. -DDISABLE_RDMA=ON \
  46. -DDISABLE_SEPTEL=ON \
  47. -DDISABLE_SNF=ON \
  48. -DDISABLE_TC=ON \
  49. # Debugging options
  50. CMAKE_OPTIONS += \
  51. -DBDEBUG=OFF \
  52. -DYYDEBUG=OFF \
  53. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB) ,,-DDISABLE_USB=ON)
  54. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT) ,,-DDISABLE_BLUETOOTH=ON)
  55. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
  56. CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
  57. define Package/libpcap/install
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
  60. endef
  61. $(eval $(call BuildPackage,libpcap))