2 # Copyright (C) 2011-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
16 PKG_SOURCE:=$(SRC_PKG_NAME)-$(PKG_VERSION)-gpl.tgz
17 PKG_SOURCE_URL:=https://polarssl.org/download/
18 PKG_MD5SUM:=869c7b5798b8769902880c7cf0212fed
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(SRC_PKG_NAME)-$(PKG_VERSION)
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
28 define Package/polarssl/Default
31 URL:=http://polarssl.org/
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.
39 define Package/libpolarssl
40 $(call Package/polarssl/Default)
44 ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
47 define Package/libpolarssl/description
48 $(call Package/polarssl/Default/description)
49 This package contains the PolarSSL library.
55 -DCMAKE_BUILD_TYPE:String="Release" \
56 -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
57 -DENABLE_TESTING:Bool=OFF \
58 -DENABLE_PROGRAMS:Bool=OFF \
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
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
74 $(eval $(call BuildPackage,libpolarssl))