2002-10-17 10:55:05 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# openssl
|
|
|
|
#
|
|
|
|
#############################################################
|
2010-10-04 16:44:51 +02:00
|
|
|
|
2011-02-09 15:33:03 +01:00
|
|
|
OPENSSL_VERSION = 1.0.0d
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_SITE = http://www.openssl.org/source
|
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)
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y)
|
|
|
|
OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
|
|
|
|
|
|
|
|
define OPENSSL_INSTALL_CRYPTODEV_H
|
|
|
|
$(INSTALL) -D package/openssl/ocf-cryptodev-20101223.h \
|
|
|
|
$(STAGING_DIR)/usr/include/crypto/cryptodev.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
OPENSSL_POST_EXTRACT_HOOKS += OPENSSL_INSTALL_CRYPTODEV_H
|
|
|
|
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)
|
2010-10-04 16:44:51 +02:00
|
|
|
OPENSSL_TARGET_ARCH = ppc
|
2005-12-03 21:32:13 +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 \
|
|
|
|
shared \
|
|
|
|
no-idea \
|
|
|
|
no-rc5 \
|
2010-06-03 22:10:10 +02:00
|
|
|
enable-camellia \
|
|
|
|
enable-mdc2 \
|
|
|
|
enable-tlsext \
|
2008-09-24 11:10:06 +02:00
|
|
|
zlib-dynamic \
|
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
|
2010-06-25 23:49:29 +02:00
|
|
|
$(MAKE1) -C $(@D) all build-shared
|
|
|
|
$(MAKE1) -C $(@D) do_linux-shared
|
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_REMOVE_OPENSSL_BIN
|
2008-09-24 11:10:06 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/openssl
|
2010-04-28 23:40:44 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_OPENSSL_BIN),y)
|
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_BIN
|
2005-02-10 04:06:39 +01:00
|
|
|
endif
|
2010-04-28 23:40:44 +02:00
|
|
|
|
|
|
|
define OPENSSL_INSTALL_FIXUPS
|
2009-04-28 20:30:06 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/c_rehash
|
2009-04-28 20:30:10 +02:00
|
|
|
# libraries gets installed read only, so strip fails
|
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
|
|
|
|
|
|
|
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$(eval $(call GENTARGETS,package,openssl))
|