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.

82 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2018 Jianhui Zhao
  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:=libuwsc
  9. PKG_VERSION:=2.0.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc.git
  14. PKG_MIRROR_HASH:=a5a4651881d9d218b5d86280afabf3e8d9158dc80ceda92fcc0b0505d2483c0b
  15. CMAKE_INSTALL:=1
  16. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  17. PKG_LICENSE:=LGPL-2.1
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libuwsc/default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. SUBMENU:=Networking
  26. TITLE:=Lightweight WebSocket client library
  27. DEPENDS:=+libubox
  28. endef
  29. define Package/libuwsc-nossl
  30. $(Package/libuwsc/default)
  31. TITLE += (NO SSL)
  32. VARIANT:=nossl
  33. endef
  34. define Package/libuwsc-openssl
  35. $(Package/libuwsc/default)
  36. TITLE += (openssl)
  37. DEPENDS += +libustream-openssl
  38. VARIANT:=openssl
  39. endef
  40. define Package/libuwsc-wolfssl
  41. $(Package/libuwsc/default)
  42. TITLE += (wolfssl)
  43. DEPENDS += +libustream-wolfssl
  44. VARIANT:=wolfssl
  45. endef
  46. define Package/libuwsc-mbedtls
  47. $(Package/libuwsc/default)
  48. TITLE += (mbedtls)
  49. DEPENDS += +libustream-mbedtls
  50. VARIANT:=mbedtls
  51. endef
  52. ifeq ($(BUILD_VARIANT),nossl)
  53. CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=off
  54. endif
  55. define Package/libuwsc/default/install
  56. $(INSTALL_DIR) $(1)/usr/lib/
  57. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
  58. endef
  59. Package/libuwsc-nossl/install = $(Package/libuwsc/default/install)
  60. Package/libuwsc-openssl/install = $(Package/libuwsc/default/install)
  61. Package/libuwsc-wolfssl/install = $(Package/libuwsc/default/install)
  62. Package/libuwsc-mbedtls/install = $(Package/libuwsc/default/install)
  63. $(eval $(call BuildPackage,libuwsc-nossl))
  64. $(eval $(call BuildPackage,libuwsc-mbedtls))
  65. $(eval $(call BuildPackage,libuwsc-wolfssl))
  66. $(eval $(call BuildPackage,libuwsc-openssl))