Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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_ASLR_PIE_REGULAR:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_LICENSE:=BSD-3-Clause
  20. PKG_LICENSE_FILES:=LICENSE
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. define Package/libpcap
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Low-level packet capture library
  27. URL:=http://www.tcpdump.org/
  28. MENU:=1
  29. ABI_VERSION:=1
  30. endef
  31. define Package/libpcap/description
  32. This package contains a system-independent library for user-level network packet
  33. capture.
  34. endef
  35. define Package/libpcap/config
  36. source "$(SOURCE)/Config.in"
  37. endef
  38. CMAKE_OPTIONS += \
  39. -DBUILD_SHARED_LIBS=ON \
  40. -DBUILD_WITH_LIBNL=OFF \
  41. # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
  42. CMAKE_OPTIONS += \
  43. -DDISABLE_DAG=ON \
  44. -DDISABLE_DBUS=ON \
  45. -DDISABLE_NETMAP=ON \
  46. -DDISABLE_RDMA=ON \
  47. -DDISABLE_SEPTEL=ON \
  48. -DDISABLE_SNF=ON \
  49. -DDISABLE_TC=ON \
  50. # Debugging options
  51. CMAKE_OPTIONS += \
  52. -DBDEBUG=OFF \
  53. -DYYDEBUG=OFF \
  54. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB) ,,-DDISABLE_USB=ON)
  55. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT) ,,-DDISABLE_BLUETOOTH=ON)
  56. CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
  57. CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
  58. define Package/libpcap/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
  61. endef
  62. $(eval $(call BuildPackage,libpcap))