From 5016bc9c6cf1913cb4a69cc32863395e930febf2 Mon Sep 17 00:00:00 2001 From: jow Date: Fri, 6 Mar 2009 12:59:45 +0000 Subject: [PATCH] [packages] add polarssl package, official successor of xyssl (#4736) git-svn-id: svn://svn.openwrt.org/openwrt/packages@14758 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/polarssl/Makefile | 79 ++++++++++++++++++++++++++ libs/polarssl/patches/100-shared.patch | 11 ++++ libs/polarssl/patches/110-make.patch | 13 +++++ 3 files changed, 103 insertions(+) create mode 100644 libs/polarssl/Makefile create mode 100644 libs/polarssl/patches/100-shared.patch create mode 100644 libs/polarssl/patches/110-make.patch diff --git a/libs/polarssl/Makefile b/libs/polarssl/Makefile new file mode 100644 index 000000000..788ed4462 --- /dev/null +++ b/libs/polarssl/Makefile @@ -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 index 000000000..9dee3c169 --- /dev/null +++ b/libs/polarssl/patches/100-shared.patch @@ -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 index 000000000..8fefac8e7 --- /dev/null +++ b/libs/polarssl/patches/110-make.patch @@ -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