polarssl: update to version 1.3.18
[openwrt/openwrt.git] / package / libs / polarssl / Makefile
1 #
2 # Copyright (C) 2011-2015 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:=polarssl
11 SRC_PKG_NAME:=mbedtls
12 PKG_VERSION:=1.3.18
13 PKG_RELEASE:=1
14 PKG_USE_MIPS16:=0
15
16 PKG_SOURCE:=$(SRC_PKG_NAME)-$(PKG_VERSION)-gpl.tgz
17 PKG_SOURCE_URL:=https://tls.mbed.org/download/
18 PKG_MD5SUM:=a229217182e024847deba3cb70bdd17e5ff4ffd9ff306cbbccfdbdff41950ea1
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(SRC_PKG_NAME)-$(PKG_VERSION)
21
22 PKG_BUILD_PARALLEL:=1
23 PKG_LICENSE:=GPL-2.0+
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
27
28 define Package/polarssl/Default
29 SUBMENU:=SSL
30 TITLE:=Embedded SSL
31 URL:=http://polarssl.org/
32 endef
33
34 define Package/polarssl/Default/description
35 The aim of the PolarSSL project is to provide a quality, open-source
36 cryptographic library written in C and targeted at embedded systems.
37 endef
38
39 define Package/libpolarssl
40 $(call Package/polarssl/Default)
41 SECTION:=libs
42 CATEGORY:=Libraries
43 TITLE+= (library)
44 ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
45 endef
46
47 define Package/libpolarssl/description
48 $(call Package/polarssl/Default/description)
49 This package contains the PolarSSL library.
50 endef
51
52 PKG_INSTALL:=1
53
54 CMAKE_OPTIONS += \
55 -DCMAKE_BUILD_TYPE:String="Release" \
56 -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
57 -DENABLE_TESTING:Bool=OFF \
58 -DENABLE_PROGRAMS:Bool=OFF \
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/
65 $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so
66 endef
67
68 define Package/libpolarssl/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/
71 $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so
72 endef
73
74 $(eval $(call BuildPackage,libpolarssl))