2002-10-17 10:55:05 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# openssl
|
|
|
|
#
|
|
|
|
#############################################################
|
2010-10-04 16:44:51 +02:00
|
|
|
|
2012-08-23 00:50:49 +02:00
|
|
|
OPENSSL_VERSION = 1.0.1c
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_SITE = http://www.openssl.org/source
|
2012-08-11 22:13:02 +02:00
|
|
|
OPENSSL_LICENSE = OpenSSL or SSLeay
|
|
|
|
OPENSSL_LICENSE_FILES = LICENSE
|
2010-04-28 23:40:44 +02:00
|
|
|
OPENSSL_INSTALL_STAGING = YES
|
|
|
|
OPENSSL_DEPENDENCIES = zlib
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_TARGET_ARCH = generic32
|
2011-01-14 14:43:24 +01:00
|
|
|
OPENSSL_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
|
2012-10-22 07:42:08 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL_BIN),)
|
|
|
|
define OPENSSL_DISABLE_APPS
|
|
|
|
$(SED) '/^build_apps/! s/build_apps//' $(@D)/Makefile.org
|
|
|
|
$(SED) '/^DIRS=/ s/apps//' $(@D)/Makefile.org
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS
|
|
|
|
|
2011-01-14 14:43:24 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y)
|
2012-05-05 05:30:24 +02:00
|
|
|
OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
|
|
|
|
OPENSSL_DEPENDENCIES += ocf-linux
|
2011-01-14 14:43:24 +01:00
|
|
|
endif
|
2008-10-13 10:10:35 +02:00
|
|
|
|
|
|
|
# Some architectures are optimized in OpenSSL
|
2010-10-04 16:44:51 +02:00
|
|
|
ifeq ($(ARCH),arm)
|
|
|
|
ifneq ($(BR2_generic_arm),y)
|
|
|
|
ifneq ($(BR2_arm610),y)
|
|
|
|
ifneq ($(BR2_arm710),y)
|
|
|
|
OPENSSL_TARGET_ARCH = armv4
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2009-07-29 21:49:45 +02:00
|
|
|
ifeq ($(ARCH),powerpc)
|
2012-12-07 03:06:20 +01:00
|
|
|
# 4xx cores seem to have trouble with openssl's ASM optimizations
|
|
|
|
ifeq ($(BR2_powerpc_401)$(BR2_powerpc_403)$(BR2_powerpc_405)$(BR2_powerpc_405fp)$(BR2_powerpc_440)$(BR2_powerpc_440fp),)
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_TARGET_ARCH = ppc
|
2005-12-03 21:32:13 +01:00
|
|
|
endif
|
2012-12-07 03:06:20 +01:00
|
|
|
endif
|
2009-07-29 23:35:41 +02:00
|
|
|
ifeq ($(ARCH),x86_64)
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_TARGET_ARCH = x86_64
|
2005-09-30 03:51:45 +02:00
|
|
|
endif
|
|
|
|
|
2011-03-14 18:33:48 +01:00
|
|
|
# Workaround for bug #3445
|
|
|
|
ifeq ($(BR2_x86_i386),y)
|
|
|
|
OPENSSL_TARGET_ARCH = generic32 386
|
|
|
|
endif
|
|
|
|
|
2010-04-28 23:40:44 +02:00
|
|
|
define OPENSSL_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); \
|
2008-09-24 11:10:06 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./Configure \
|
|
|
|
linux-$(OPENSSL_TARGET_ARCH) \
|
|
|
|
--prefix=/usr \
|
2009-03-05 14:48:29 +01:00
|
|
|
--openssldir=/etc/ssl \
|
2011-02-03 13:55:48 +01:00
|
|
|
--libdir=/lib \
|
2008-09-24 11:10:06 +02:00
|
|
|
threads \
|
2012-07-01 23:59:29 +02:00
|
|
|
$(if $(BR2_PREFER_STATIC_LIB),no-shared,shared) \
|
2008-09-24 11:10:06 +02:00
|
|
|
no-idea \
|
|
|
|
no-rc5 \
|
2010-06-03 22:10:10 +02:00
|
|
|
enable-camellia \
|
|
|
|
enable-mdc2 \
|
|
|
|
enable-tlsext \
|
2012-07-01 23:59:29 +02:00
|
|
|
$(if $(BR2_PREFER_STATIC_LIB),zlib,zlib-dynamic) \
|
|
|
|
$(if $(BR2_PREFER_STATIC_LIB),no-dso) \
|
2007-04-16 20:51:20 +02:00
|
|
|
)
|
2010-04-28 23:40:44 +02:00
|
|
|
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(@D)/Makefile
|
2011-01-14 14:43:24 +01:00
|
|
|
$(SED) "s:-O[0-9]:$(OPENSSL_CFLAGS):" $(@D)/Makefile
|
2010-04-28 23:40:44 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define OPENSSL_BUILD_CMDS
|
2012-12-16 10:49:01 +01:00
|
|
|
$(MAKE1) -C $(@D)
|
2010-04-28 23:40:44 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define OPENSSL_INSTALL_STAGING_CMDS
|
|
|
|
$(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define OPENSSL_INSTALL_TARGET_CMDS
|
|
|
|
$(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define OPENSSL_REMOVE_DEV_FILES
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/ssl
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifneq ($(BR2_HAVE_DEVFILES),y)
|
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_DEV_FILES
|
|
|
|
endif
|
|
|
|
|
|
|
|
define OPENSSL_INSTALL_FIXUPS
|
2009-04-28 20:30:06 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/c_rehash
|
2012-07-01 23:59:29 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS
|
|
|
|
|
|
|
|
ifneq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
|
|
|
|
# libraries gets installed read only, so strip fails
|
|
|
|
define OPENSSL_INSTALL_FIXUPS_SHARED
|
2010-04-28 23:40:44 +02:00
|
|
|
chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so
|
2009-04-28 20:30:10 +02:00
|
|
|
for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \
|
2010-04-28 23:40:44 +02:00
|
|
|
do chmod +w $$i; done
|
|
|
|
endef
|
|
|
|
|
2012-07-01 23:59:29 +02:00
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS_SHARED
|
|
|
|
|
|
|
|
endif
|
2010-04-28 23:40:44 +02:00
|
|
|
|
|
|
|
define OPENSSL_REMOVE_OPENSSL_ENGINES
|
2008-09-24 11:10:06 +02:00
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/engines
|
2010-04-28 23:40:44 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
|
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_ENGINES
|
2005-07-12 21:53:12 +02:00
|
|
|
endif
|
2009-04-28 20:30:20 +02:00
|
|
|
|
2010-04-28 23:40:44 +02:00
|
|
|
define OPENSSL_UNINSTALL_CMDS
|
2009-04-28 20:30:20 +02:00
|
|
|
rm -rf $(addprefix $(TARGET_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
|
|
|
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
|
|
|
rm -rf $(addprefix $(STAGING_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
|
|
|
rm -rf $(addprefix $(STAGING_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
2010-04-28 23:40:44 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|