diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2010-02-14 19:25:48 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2010-02-14 19:25:48 +0100 |
commit | f04cc4cd7938e4c259694b1b82492ea07d05f2c5 (patch) | |
tree | 2f98b7eb6c8b90222ff81ec7892d0d43ff8d6aeb /packages/security | |
parent | af4d84a1eecaa53f63788880f9c5e3c217283278 (diff) | |
download | embtoolkit-f04cc4cd7938e4c259694b1b82492ea07d05f2c5.tar.gz embtoolkit-f04cc4cd7938e4c259694b1b82492ea07d05f2c5.tar.bz2 embtoolkit-f04cc4cd7938e4c259694b1b82492ea07d05f2c5.tar.xz |
Packages: New openssl: add openssl among security packages
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'packages/security')
-rw-r--r-- | packages/security/openssl/openssl.kconfig | 50 | ||||
-rw-r--r-- | packages/security/openssl/openssl.mk | 99 |
2 files changed, 149 insertions, 0 deletions
diff --git a/packages/security/openssl/openssl.kconfig b/packages/security/openssl/openssl.kconfig new file mode 100644 index 0000000..f38f378 --- /dev/null +++ b/packages/security/openssl/openssl.kconfig @@ -0,0 +1,50 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2010 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file openssl.kconfig +# \brief openssl.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date February 2010 +################################################################################ + +config EMBTK_HAVE_OPENSSL + bool "Have OpenSSL" + help + The OpenSSL Project is a collaborative effort to develop a + robust, commercial-grade, full-featured, and Open Source toolkit + implementing the Secure Sockets Layer (SSL v2/v3) and Transport + Layer Security (TLS v1) protocols as well as a full-strength + general purpose cryptography library. +choice + prompt "OpenSSL version you wish" + depends on EMBTK_HAVE_OPENSSL + help + Here you can choose which version of openssl you want to use. + + config EMBTK_OPENSSL_VERSION_0_9_8L + bool "openssl-0.9.8l" + select EMBTK_OPENSSL_NEED_PATCH +endchoice + +config EMBTK_OPENSSL_VERSION_STRING + string + default "0.9.8l" if EMBTK_OPENSSL_VERSION_0_9_8L + +config EMBTK_OPENSSL_NEED_PATCH + bool + diff --git a/packages/security/openssl/openssl.mk b/packages/security/openssl/openssl.mk new file mode 100644 index 0000000..3ab493b --- /dev/null +++ b/packages/security/openssl/openssl.mk @@ -0,0 +1,99 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2010 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file openssl.mk +# \brief openssl.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date February 2010 +################################################################################ + +OPENSSL_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_OPENSSL_VERSION_STRING))) +OPENSSL_SITE := ftp://ftp.openssl.org/source +OPENSSL_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/openssl/$(OPENSSL_VERSION) +OPENSSL_PACKAGE := openssl-$(OPENSSL_VERSION).tar.gz +OPENSSL_BUILD_DIR := $(PACKAGES_BUILD)/openssl-$(OPENSSL_VERSION) + +OPENSSL_ETC = ssl +OPENSSL_BINS = c_rehash openssl +OPENSSL_SBINS = +OPENSSL_INCLUDES = openssl +OPENSSL_LIBS = engines/lib4758cca.so engines/libaep.so engines/libatalla.so \ + engines/libcapi.so engines/libchil.so engines/libcswift.so \ + engines/libgmp.so engines/libnuron.so engines/libsureware.so \ + engines/libubsec.so libcrypto.* libssl.* +OPENSSL_PKGCONFIGS = libcrypto.pc libssl.pc openssl.pc + +openssl_install: $(OPENSSL_BUILD_DIR)/.installed + +$(OPENSSL_BUILD_DIR)/.installed: download_openssl \ + $(OPENSSL_BUILD_DIR)/.decompressed $(OPENSSL_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + openssl-$(OPENSSL_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(OPENSSL_BUILD_DIR) CC=$(TARGETCC_CACHED) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)$(MAKE) -C $(OPENSSL_BUILD_DIR) \ + INSTALL_PREFIX=$(SYSROOT)/ LIBDIR=lib32 MANDIR=/usr/share/man install +else + $(Q)$(MAKE) -C $(OPENSSL_BUILD_DIR) \ + INSTALL_PREFIX=$(SYSROOT)/ LIBDIR=lib MANDIR=/usr/share/man install +endif + $(Q)-cp -R $(SYSROOT)/etc/ssl $(ROOTFS)/etc/ + $(Q)$(MAKE) libtool_files_adapt + $(Q)$(MAKE) pkgconfig_files_adapt + @touch $@ + +download_openssl: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(OPENSSL_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(OPENSSL_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(OPENSSL_PACKAGE) \ + $(OPENSSL_SITE)/$(OPENSSL_PACKAGE) +ifeq ($(CONFIG_EMBTK_OPENSSL_NEED_PATCH),y) + @test -e $(DOWNLOAD_DIR)/openssl-$(OPENSSL_VERSION).patch || \ + wget $(OPENSSL_PATCH_SITE)/openssl-$(OPENSSL_VERSION)-*.patch \ + -O $(DOWNLOAD_DIR)/openssl-$(OPENSSL_VERSION).patch +endif + + +$(OPENSSL_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(OPENSSL_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(OPENSSL_PACKAGE) +ifeq ($(CONFIG_EMBTK_OPENSSL_NEED_PATCH),y) + cd $(OPENSSL_BUILD_DIR); \ + patch -p1 < $(DOWNLOAD_DIR)/openssl-$(OPENSSL_VERSION).patch +endif + @touch $@ + +$(OPENSSL_BUILD_DIR)/.configured: + $(Q)cd $(OPENSSL_BUILD_DIR); \ + ./Configure linux-generic32 --openssldir=/etc/ssl --prefix=/usr shared + @touch $@ + +openssl_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup openssl-$(OPENSSL_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(OPENSSL_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(OPENSSL_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(OPENSSL_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(OPENSSL_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(OPENSSL_PKGCONFIGS) + $(Q)-cd $(SYSROOT)/etc; rm -rf $(OPENSSL_ETC) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(OPENSSL_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(OPENSSL_PKGCONFIGS) +endif + |