ustream-ssl: update to latest version, fixes writes before ssl handshake completion
[openwrt/openwrt.git] / package / libs / ustream-ssl / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ustream-ssl
4 PKG_VERSION:=2014-03-17
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL:=git://nbd.name/ustream-ssl.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=14fa00e3fe1ca61fcc546ee18976ec23fbe62d74
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12 CMAKE_INSTALL:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
15
16 PKG_LICENSE:=ISC
17 PKG_LICENSE_FILES:=
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 define Package/libustream/default
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=ustream SSL Library
28 DEPENDS:=+libubox
29 endef
30
31 define Package/libustream-openssl
32 $(Package/libustream/default)
33 TITLE += (openssl)
34 DEPENDS += +libopenssl
35 VARIANT:=openssl
36 endef
37
38 define Package/libustream-cyassl
39 $(Package/libustream/default)
40 TITLE += (cyassl)
41 DEPENDS += +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 ifeq ($(BUILD_VARIANT),cyassl)
53 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl
54 CMAKE_OPTIONS += -DCYASSL=on
55 endif
56 ifeq ($(BUILD_VARIANT),polarssl)
57 CMAKE_OPTIONS += -DPOLARSSL=on
58 endif
59
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
65 Package/libustream-openssl/install = $(Package/libustream/default/install)
66 Package/libustream-cyassl/install = $(Package/libustream/default/install)
67 Package/libustream-polarssl/install = $(Package/libustream/default/install)
68
69 $(eval $(call BuildPackage,libustream-polarssl))
70 $(eval $(call BuildPackage,libustream-cyassl))
71 $(eval $(call BuildPackage,libustream-openssl))