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