polarssl: update to 1.2.6
[openwrt.git] / package / libs / polarssl / Makefile
1
2 # Copyright (C) 2011-2013 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 PKG_VERSION:=1.2.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
15 PKG_SOURCE_URL:=https://polarssl.org/code/releases
16 PKG_MD5SUM:=e00d55ddda1e68a16af766dd92d69ce6
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/cmake.mk
20
21 define Package/polarssl/Default
22   SUBMENU:=SSL
23   TITLE:=Embedded SSL
24   URL:=http://polarssl.org/
25 endef
26
27 define Package/polarssl/Default/description
28 The aim of the PolarSSL project is to provide a quality, open-source
29 cryptographic library written in C and targeted at embedded systems.
30 endef
31
32 define Package/libpolarssl
33 $(call Package/polarssl/Default)
34   SECTION:=libs
35   CATEGORY:=Libraries
36   TITLE+= (library)
37 endef
38
39 define Package/libpolarssl/description
40 $(call Package/polarssl/Default/description)
41 This package contains the PolarSSL library.
42 endef
43
44 define Package/polarssl-progs
45 $(call Package/polarssl/Default)
46   SECTION:=utils
47   CATEGORY:=Utilities
48   DEPENDS:=+libpolarssl
49   TITLE+= (programs)
50 endef
51
52 define Package/polarssl-progs/description
53 $(call Package/polarssl/Default/description)
54 This package contains the PolarSSL programs.
55 endef
56
57 PKG_INSTALL:=1
58
59 CMAKE_OPTIONS += \
60         -DCMAKE_BUILD_TYPE:String="Release" \
61         -DUSE_SHARED_POLARSSL_LIBRARY:Bool=ON \
62
63 define Build/InstallDev
64         $(INSTALL_DIR) $(1)/usr/include
65         $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
66         $(INSTALL_DIR) $(1)/usr/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
68 endef
69
70 define Package/libpolarssl/install
71         $(INSTALL_DIR) $(1)/usr/lib
72         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
73 endef
74
75 define Package/polarssl-progs/install
76         $(INSTALL_DIR) $(1)/usr/bin
77         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
78 endef
79
80 $(eval $(call BuildPackage,libpolarssl))
81 $(eval $(call BuildPackage,polarssl-progs))