1
0

Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ustream-ssl
  3. PKG_RELEASE:=3
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(LEDE_GIT)/project/ustream-ssl.git
  6. PKG_SOURCE_DATE:=2016-07-02
  7. PKG_SOURCE_VERSION:=ec80adaa1b47f28d426fa19c692011ce60b992d6
  8. PKG_MIRROR_HASH:=bfbad6b4e8c1e933f0bfaab43cbdd44a536c08128c3a779e6f2395a6a886aab7
  9. CMAKE_INSTALL:=1
  10. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  11. PKG_LICENSE:=ISC
  12. PKG_LICENSE_FILES:=
  13. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. define Package/libustream/default
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=ustream SSL Library
  20. DEPENDS:=+libubox
  21. ABI_VERSION:=$(PKG_VERSION)
  22. endef
  23. define Package/libustream-openssl
  24. $(Package/libustream/default)
  25. TITLE += (openssl)
  26. DEPENDS += +PACKAGE_libustream-openssl:libopenssl
  27. VARIANT:=openssl
  28. endef
  29. define Package/libustream-cyassl
  30. $(Package/libustream/default)
  31. TITLE += (cyassl)
  32. DEPENDS += +PACKAGE_libustream-cyassl:libcyassl
  33. VARIANT:=cyassl
  34. endef
  35. define Package/libustream-mbedtls
  36. $(Package/libustream/default)
  37. TITLE += (mbedtls)
  38. DEPENDS += +libmbedtls
  39. VARIANT:=mbedtls
  40. DEFAULT_VARIANT:=1
  41. endef
  42. ifeq ($(BUILD_VARIANT),cyassl)
  43. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl -DHAVE_SNI
  44. CMAKE_OPTIONS += -DCYASSL=on
  45. endif
  46. ifeq ($(BUILD_VARIANT),mbedtls)
  47. CMAKE_OPTIONS += -DMBEDTLS=on
  48. endif
  49. define Package/libustream/default/install
  50. $(INSTALL_DIR) $(1)/lib/
  51. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libustream-ssl.so $(1)/lib/
  52. endef
  53. Package/libustream-openssl/install = $(Package/libustream/default/install)
  54. Package/libustream-cyassl/install = $(Package/libustream/default/install)
  55. Package/libustream-mbedtls/install = $(Package/libustream/default/install)
  56. $(eval $(call BuildPackage,libustream-mbedtls))
  57. $(eval $(call BuildPackage,libustream-cyassl))
  58. $(eval $(call BuildPackage,libustream-openssl))