libs/wolfssl: bump to version 3.12.0 ; add 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.12.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
15 PKG_SOURCE_URL:=https://www.wolfssl.com/
16 PKG_HASH:=5bb196056ac0086efbf07ecea7d3e73b1c31722eb52a88b85879f920428a9a0f
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20 PKG_USE_MIPS16:=0
21 PKG_BUILD_PARALLEL:=1
22 PKG_LICENSE:=GPL-2.0+
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libwolfssl
27 SECTION:=libs
28 SUBMENU:=SSL
29 CATEGORY:=Libraries
30 TITLE:=wolfSSL library
31 URL:=http://www.wolfssl.com/
32 MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
33 MENU:=1
34 PROVIDES:=libcyassl
35 endef
36
37 define Package/libwolfssl/description
38 wolfSSL (formerly CyaSSL) is an SSL library optimized for small
39 footprint, both on disk and for memory use.
40 endef
41
42 define Package/libwolfssl/config
43 source "$(SOURCE)/Config.in"
44 endef
45
46 TARGET_CFLAGS += $(FPIC)
47
48 # --enable-stunnel needed for OpenSSL API compatibility bits
49 CONFIGURE_ARGS += \
50 --enable-opensslextra \
51 --enable-sni \
52 --enable-stunnel \
53 --disable-examples
54
55 ifeq ($(CONFIG_IPV6),y)
56 CONFIGURE_ARGS += \
57 --enable-ipv6
58 endif
59
60 ifeq ($(CONFIG_WOLFSSL_HAS_AES_CCM),y)
61 CONFIGURE_ARGS += \
62 --enable-aesccm
63 endif
64
65 ifneq ($(CONFIG_WOLFSSL_HAS_AES_GCM),y)
66 CONFIGURE_ARGS += \
67 --disable-aesgcm
68 endif
69
70 ifneq ($(CONFIG_WOLFSSL_HAS_CHACHA),y)
71 CONFIGURE_ARGS += \
72 --disable-chacha
73 endif
74
75 ifeq ($(CONFIG_WOLFSSL_HAS_ECC),y)
76 CONFIGURE_ARGS += \
77 --enable-ecc \
78 --enable-supportedcurves
79 endif
80
81 ifneq ($(CONFIG_WOLFSSL_HAS_DH),y)
82 CONFIGURE_ARGS += \
83 --enable-dh
84 endif
85
86 ifeq ($(CONFIG_WOLFSSL_HAS_ARC4),n)
87 CONFIGURE_ARGS += \
88 --disable-arc4
89 endif
90
91 ifeq ($(CONFIG_WOLFSSL_HAS_DES3),y)
92 CONFIGURE_ARGS += \
93 --disable-des3
94 endif
95
96 ifeq ($(CONFIG_WOLFSSL_HAS_PSK),y)
97 CONFIGURE_ARGS += \
98 --enable-psk
99 endif
100
101 ifeq ($(CONFIG_WOLFSSL_HAS_DTLS),y)
102 CONFIGURE_ARGS += \
103 --enable-dtls
104 endif
105
106 ifeq ($(CONFIG_WOLFSSL_HAS_ECC25519),y)
107 CONFIGURE_ARGS += \
108 --enable-curve25519
109 endif
110
111 ifneq ($(CONFIG_WOLFSSL_HAS_POLY1305),y)
112 CONFIGURE_ARGS += \
113 --enable-poly1305
114 endif
115
116 #ifneq ($(CONFIG_TARGET_x86),)
117 # CONFIGURE_ARGS += --enable-intelasm
118 #endif
119 #ifneq ($(CONFIG_TARGET_x86_64),)
120 # CONFIGURE_ARGS += --enable-intelasm
121 #endif
122
123 define Build/InstallDev
124 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
125 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
126
127 $(INSTALL_DIR) $(1)/usr/lib
128 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
129 ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
130 ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
131
132 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
133 endef
134
135 define Package/libwolfssl/install
136 $(INSTALL_DIR) $(1)/usr/lib
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/
138 ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
139 endef
140
141 $(eval $(call BuildPackage,libwolfssl))