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