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