wolfssl: remove myself as maintainer
[openwrt/staging/mkresin.git] / package / libs / wolfssl / Makefile
1 #
2 # Copyright (C) 2006-2017 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wolfssl
11 PKG_VERSION:=3.14.4
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
15 # PKG_SOURCE_URL:=https://www.wolfssl.com/
16 PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
17 PKG_HASH:=1da1b45dec4a455716c8547074ad883c737865225f69443bb173c0dc21683fd1
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21 PKG_USE_MIPS16:=0
22 PKG_BUILD_PARALLEL:=1
23 PKG_LICENSE:=GPL-2.0+
24 PKG_CPE_ID:=cpe:/a:yassl:cyassl
25
26 PKG_CONFIG_DEPENDS:=\
27 CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AES_GCM \
28 CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA \
29 CONFIG_WOLFSSL_HAS_DES3 CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \
30 CONFIG_WOLFSSL_HAS_ECC CONFIG_WOLFSSL_HAS_ECC25519 \
31 CONFIG_WOLFSSL_HAS_OCSP CONFIG_WOLFSSL_HAS_POLY_1305 \
32 CONFIG_WOLFSSL_HAS_PSK CONFIG_WOLFSSL_HAS_SESSION_TICKET \
33 CONFIG_WOLFSSL_HAS_WPAS
34
35 include $(INCLUDE_DIR)/package.mk
36
37 define Package/libwolfssl
38 SECTION:=libs
39 SUBMENU:=SSL
40 CATEGORY:=Libraries
41 TITLE:=wolfSSL library
42 URL:=http://www.wolfssl.com/
43 MENU:=1
44 PROVIDES:=libcyassl
45 endef
46
47 define Package/libwolfssl/description
48 wolfSSL (formerly CyaSSL) is an SSL library optimized for small
49 footprint, both on disk and for memory use.
50 endef
51
52 define Package/libwolfssl/config
53 source "$(SOURCE)/Config.in"
54 endef
55
56 TARGET_CFLAGS += $(FPIC)
57
58 # --enable-stunnel needed for OpenSSL API compatibility bits
59 CONFIGURE_ARGS += \
60 --enable-opensslextra \
61 --enable-sni \
62 --enable-stunnel \
63 --disable-examples \
64 --disable-leanpsk \
65 --disable-leantls \
66
67 ifeq ($(CONFIG_IPV6),y)
68 CONFIGURE_ARGS += \
69 --enable-ipv6
70 endif
71
72 ifeq ($(CONFIG_WOLFSSL_HAS_AES_CCM),y)
73 CONFIGURE_ARGS += \
74 --enable-aesccm
75 endif
76
77 ifneq ($(CONFIG_WOLFSSL_HAS_AES_GCM),y)
78 CONFIGURE_ARGS += \
79 --disable-aesgcm
80 endif
81
82 ifneq ($(CONFIG_WOLFSSL_HAS_CHACHA),y)
83 CONFIGURE_ARGS += \
84 --disable-chacha
85 endif
86
87 ifeq ($(CONFIG_WOLFSSL_HAS_ECC),y)
88 CONFIGURE_ARGS += \
89 --enable-ecc \
90 --enable-supportedcurves
91 endif
92
93 ifeq ($(CONFIG_WOLFSSL_HAS_DH),y)
94 CONFIGURE_ARGS += \
95 --enable-dh
96 endif
97
98 ifneq ($(CONFIG_WOLFSSL_HAS_ARC4),y)
99 CONFIGURE_ARGS += \
100 --disable-arc4
101 else
102 CONFIGURE_ARGS += \
103 --enable-arc4
104 endif
105
106 ifneq ($(CONFIG_WOLFSSL_HAS_DES3),y)
107 CONFIGURE_ARGS += \
108 --disable-des3
109 else
110 CONFIGURE_ARGS += \
111 --enable-des3
112 endif
113
114 ifeq ($(CONFIG_WOLFSSL_HAS_PSK),y)
115 CONFIGURE_ARGS += \
116 --enable-psk
117 endif
118
119 ifeq ($(CONFIG_WOLFSSL_HAS_SESSION_TICKET),y)
120 CONFIGURE_ARGS += \
121 --enable-session-ticket
122 endif
123
124 ifeq ($(CONFIG_WOLFSSL_HAS_DTLS),y)
125 CONFIGURE_ARGS += \
126 --enable-dtls
127 endif
128
129 ifeq ($(CONFIG_WOLFSSL_HAS_OCSP),y)
130 CONFIGURE_ARGS += \
131 --enable-ocsp --enable-ocspstapling --enable-ocspstapling2
132 endif
133
134 ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y)
135 CONFIGURE_ARGS += \
136 --enable-wpas --enable-sha512 --enable-fortress --enable-fastmath
137 endif
138
139 ifeq ($(CONFIG_WOLFSSL_HAS_ECC25519),y)
140 CONFIGURE_ARGS += \
141 --enable-curve25519
142 endif
143
144 ifneq ($(CONFIG_WOLFSSL_HAS_POLY1305),y)
145 CONFIGURE_ARGS += \
146 --enable-poly1305
147 endif
148
149 #ifneq ($(CONFIG_TARGET_x86),)
150 # CONFIGURE_ARGS += --enable-intelasm
151 #endif
152 #ifneq ($(CONFIG_TARGET_x86_64),)
153 # CONFIGURE_ARGS += --enable-intelasm
154 #endif
155
156 define Build/InstallDev
157 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
158 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
159
160 $(INSTALL_DIR) $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
162 ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
163 ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
164
165 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
166 endef
167
168 define Package/libwolfssl/install
169 $(INSTALL_DIR) $(1)/usr/lib
170 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/
171 ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
172 endef
173
174 $(eval $(call BuildPackage,libwolfssl))