ustream-ssl: remove extra DEFAULT_VARIANT from libustream-polarssl
[openwrt/staging/lynxis/omap.git] / package / libs / ustream-ssl / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ustream-ssl
4 PKG_RELEASE:=2
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 endef
51
52 define Package/libustream-mbedtls
53 $(Package/libustream/default)
54 TITLE += (mbedtls)
55 DEPENDS += +libmbedtls
56 VARIANT:=mbedtls
57 DEFAULT_VARIANT:=1
58 endef
59
60 ifeq ($(BUILD_VARIANT),cyassl)
61 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl -DHAVE_SNI
62 CMAKE_OPTIONS += -DCYASSL=on
63 endif
64 ifeq ($(BUILD_VARIANT),polarssl)
65 CMAKE_OPTIONS += -DPOLARSSL=on
66 endif
67 ifeq ($(BUILD_VARIANT),mbedtls)
68 CMAKE_OPTIONS += -DMBEDTLS=on
69 endif
70
71 define Package/libustream/default/install
72 $(INSTALL_DIR) $(1)/lib/
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libustream-ssl.so $(1)/lib/
74 endef
75
76 Package/libustream-openssl/install = $(Package/libustream/default/install)
77 Package/libustream-cyassl/install = $(Package/libustream/default/install)
78 Package/libustream-polarssl/install = $(Package/libustream/default/install)
79 Package/libustream-mbedtls/install = $(Package/libustream/default/install)
80
81 $(eval $(call BuildPackage,libustream-polarssl))
82 $(eval $(call BuildPackage,libustream-mbedtls))
83 $(eval $(call BuildPackage,libustream-cyassl))
84 $(eval $(call BuildPackage,libustream-openssl))