Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ustream-ssl
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(LEDE_GIT)/project/ustream-ssl.git
  6. PKG_SOURCE_DATE:=2018-05-22
  7. PKG_SOURCE_VERSION:=5322f9db23b69fdc2b4760a6cfd67848a11818a4
  8. PKG_MIRROR_HASH:=c943f6e603b1309b33fd276acddffb33a171b6370455b6c21200897012e42d05
  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))