Makefile 2.3 KB

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