Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ustream-ssl
  3. PKG_VERSION:=2014-03-25
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=git://nbd.name/ustream-ssl.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=fc0b5ec804ee43c532978dd04ab0509c34baefb0
  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@openwrt.org>
  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. ifeq ($(BUILD_VARIANT),cyassl)
  44. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl
  45. CMAKE_OPTIONS += -DCYASSL=on
  46. endif
  47. ifeq ($(BUILD_VARIANT),polarssl)
  48. CMAKE_OPTIONS += -DPOLARSSL=on
  49. endif
  50. define Package/libustream/default/install
  51. $(INSTALL_DIR) $(1)/lib/
  52. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libustream-ssl.so $(1)/lib/
  53. endef
  54. Package/libustream-openssl/install = $(Package/libustream/default/install)
  55. Package/libustream-cyassl/install = $(Package/libustream/default/install)
  56. Package/libustream-polarssl/install = $(Package/libustream/default/install)
  57. $(eval $(call BuildPackage,libustream-polarssl))
  58. $(eval $(call BuildPackage,libustream-cyassl))
  59. $(eval $(call BuildPackage,libustream-openssl))