[packages] add polarssl package, official successor of xyssl (#4736)
[openwrt/svn-archive/archive.git] / libs / polarssl / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 12228 2008-08-06 22:43:15Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=polarssl
12 PKG_VERSION:=0.10.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
16 PKG_SOURCE_URL:=http://polarssl.org/code/releases/
17 PKG_MD5SUM:=49bd1c6b46a8699d8bf215d3a318899e
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/polarssl/Default
22 TITLE:=Embedded SSL
23 URL:=http://polarssl.org/
24 endef
25
26 define Package/libpolarssl/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/polarssl-progs
39 $(call Package/polarssl/Default)
40 SECTION:=utils
41 CATEGORY:=Utilities
42 DEPENDS:=+libpolarssl
43 TITLE+= (programs)
44 endef
45
46 define Build/Configure
47 endef
48
49 TARGET_CFLAGS += $(FPIC)
50
51 define Build/Compile
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 $(TARGET_CONFIGURE_OPTS) \
54 OFLAGS="$(TARGET_CFLAGS)" \
55 all
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
58 install
59 endef
60
61 define Build/InstallDev
62 mkdir -p $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
64 mkdir -p $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.{a,so} $(1)/usr/lib/
66 endef
67
68 define Package/libpolarssl/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so $(1)/usr/lib/
71 endef
72
73 define Package/polarssl-progs/install
74 $(INSTALL_DIR) $(1)/usr/bin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/polarssl_* $(1)/usr/bin/
76 endef
77
78 $(eval $(call BuildPackage,libpolarssl))
79 $(eval $(call BuildPackage,polarssl-progs))