You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2017 Steven Hessing
  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:=libtins
  9. PKG_VERSION:=4.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/mfontanini/libtins/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=a9fed73e13f06b06a4857d342bb30815fa8c359d00bd69547e567eecbbb4c3a1
  14. PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_PARALLEL:=1
  18. CMAKE_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/libtins
  22. SECTION:=net
  23. CATEGORY:=Libraries
  24. TITLE:=libtins
  25. URL:=https://libtins.github.io/
  26. DEPENDS:=+libstdcpp +libpcap
  27. endef
  28. define Package/libtins/description
  29. libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.
  30. endef
  31. CMAKE_OPTIONS += \
  32. -D_RUN_RESULT_VAR=FORCE \
  33. -DLIBTINS_BUILD_EXAMPLES=OFF \
  34. -DLIBTINS_BUILD_TESTS=OFF \
  35. -DLIBTINS_ENABLE_ACK_TRACKER=OFF \
  36. -DLIBTINS_ENABLE_CXX11=ON \
  37. -DLIBTINS_ENABLE_DOT11=OFF \
  38. -DLIBTINS_ENABLE_PCAP=ON \
  39. -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=OFF \
  40. -DLIBTINS_ENABLE_WPA2=OFF
  41. TARGET_CXXFLAGS += -fno-rtti -ffunction-sections -fdata-sections -flto
  42. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  43. define Package/libtins/install
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
  46. endef
  47. $(eval $(call BuildPackage,libtins))