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