[packages] add polarssl package, official successor of xyssl (#4736)
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Mar 2009 12:59:45 +0000 (12:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Mar 2009 12:59:45 +0000 (12:59 +0000)
SVN-Revision: 14758

libs/polarssl/Makefile [new file with mode: 0644]
libs/polarssl/patches/100-shared.patch [new file with mode: 0644]
libs/polarssl/patches/110-make.patch [new file with mode: 0644]

diff --git a/libs/polarssl/Makefile b/libs/polarssl/Makefile
new file mode 100644 (file)
index 0000000..788ed44
--- /dev/null
@@ -0,0 +1,79 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 12228 2008-08-06 22:43:15Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=polarssl
+PKG_VERSION:=0.10.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
+PKG_SOURCE_URL:=http://polarssl.org/code/releases/
+PKG_MD5SUM:=49bd1c6b46a8699d8bf215d3a318899e
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/polarssl/Default
+  TITLE:=Embedded SSL
+  URL:=http://polarssl.org/
+endef
+
+define Package/libpolarssl/Default/description
+ The aim of the PolarSSL project is to provide a quality, open-source 
+ cryptographic library written in C and targeted at embedded systems.
+endef
+
+define Package/libpolarssl
+$(call Package/polarssl/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (library)
+endef
+
+define Package/polarssl-progs
+$(call Package/polarssl/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libpolarssl
+  TITLE+= (programs)
+endef
+
+define Build/Configure
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               OFLAGS="$(TARGET_CFLAGS)" \
+               all
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)/usr" \
+               install
+endef
+
+define Build/InstallDev
+       mkdir -p $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.{a,so} $(1)/usr/lib/
+endef
+
+define Package/libpolarssl/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so $(1)/usr/lib/
+endef
+
+define Package/polarssl-progs/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/polarssl_* $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libpolarssl))
+$(eval $(call BuildPackage,polarssl-progs))
diff --git a/libs/polarssl/patches/100-shared.patch b/libs/polarssl/patches/100-shared.patch
new file mode 100644 (file)
index 0000000..9dee3c1
--- /dev/null
@@ -0,0 +1,11 @@
+--- polarssl-0.10.1.orig/library/Makefile      2009-01-11 00:31:23.000000000 +0100
++++ polarssl-0.10.1/library/Makefile   2009-03-05 15:11:20.352419296 +0100
+@@ -29,7 +29,7 @@ OBJS=        aes.o           arc4.o          base64.o        \
+ .SILENT:
+-all: static
++all: static shared
+ static: libpolarssl.a
diff --git a/libs/polarssl/patches/110-make.patch b/libs/polarssl/patches/110-make.patch
new file mode 100644 (file)
index 0000000..8fefac8
--- /dev/null
@@ -0,0 +1,13 @@
+--- polarssl-0.10.1.orig/Makefile      2009-01-04 17:05:10.000000000 +0100
++++ polarssl-0.10.1/Makefile   2009-03-05 15:11:20.356675557 +0100
+@@ -5,8 +5,8 @@ PREFIX=polarssl_
+ .SILENT:
+ all:
+-      cd library  && make all && cd ..
+-      cd programs && make all && cd ..
++      cd library  && $(MAKE) all && cd ..
++      cd programs && $(MAKE) all && cd ..
+ install:
+       mkdir -p $(DESTDIR)/include/polarssl