ustream-ssl: px5g: Rebuild package
[openwrt/openwrt.git] / package / libs / ustream-ssl / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ustream-ssl
4 PKG_RELEASE:=3
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_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-wolfssl
39 $(Package/libustream/default)
40 TITLE += (wolfssl)
41 DEPENDS += +PACKAGE_libustream-wolfssl:libwolfssl
42 VARIANT:=wolfssl
43 endef
44
45 define Package/libustream-mbedtls
46 $(Package/libustream/default)
47 TITLE += (mbedtls)
48 DEPENDS += +libmbedtls
49 VARIANT:=mbedtls
50 DEFAULT_VARIANT:=1
51 endef
52
53 ifeq ($(BUILD_VARIANT),wolfssl)
54 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl -DHAVE_SNI
55 CMAKE_OPTIONS += -DCYASSL=on
56 endif
57 ifeq ($(BUILD_VARIANT),mbedtls)
58 CMAKE_OPTIONS += -DMBEDTLS=on
59 endif
60
61 define Package/libustream/default/install
62 $(INSTALL_DIR) $(1)/lib/
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libustream-ssl.so $(1)/lib/
64 endef
65
66 Package/libustream-openssl/install = $(Package/libustream/default/install)
67 Package/libustream-wolfssl/install = $(Package/libustream/default/install)
68 Package/libustream-mbedtls/install = $(Package/libustream/default/install)
69
70 $(eval $(call BuildPackage,libustream-mbedtls))
71 $(eval $(call BuildPackage,libustream-wolfssl))
72 $(eval $(call BuildPackage,libustream-openssl))