2002-10-17 10:55:05 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# openssl
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-11-10 17:42:35 +01:00
|
|
|
OPENSSL_VERSION:=0.9.8l
|
2002-10-17 10:55:05 +02:00
|
|
|
OPENSSL_SITE:=http://www.openssl.org/source
|
|
|
|
|
2008-10-13 10:10:35 +02:00
|
|
|
OPENSSL_TARGET_ARCH=generic32
|
|
|
|
|
|
|
|
# Some architectures are optimized in OpenSSL
|
2009-07-29 21:49:45 +02:00
|
|
|
ifeq ($(ARCH),ia64)
|
2008-10-13 10:10:35 +02:00
|
|
|
OPENSSL_TARGET_ARCH=ia64
|
|
|
|
endif
|
2009-07-29 21:49:45 +02:00
|
|
|
ifeq ($(ARCH),powerpc)
|
2008-10-13 10:10:35 +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)
|
2008-10-13 10:10:35 +02:00
|
|
|
OPENSSL_TARGET_ARCH=x86_64
|
2005-09-30 03:51:45 +02:00
|
|
|
endif
|
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
OPENSSL_INSTALL_STAGING = YES
|
|
|
|
OPENSSL_INSTALL_STAGING_OPT = INSTALL_PREFIX=$(STAGING_DIR) install
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
OPENSSL_INSTALL_TARGET_OPT = INSTALL_PREFIX=$(TARGET_DIR) install
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
OPENSSL_DEPENDENCIES = zlib
|
2007-08-13 21:35:08 +02:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
$(eval $(call AUTOTARGETS,package,openssl))
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
$(OPENSSL_TARGET_CONFIGURE):
|
|
|
|
(cd $(OPENSSL_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./Configure \
|
|
|
|
linux-$(OPENSSL_TARGET_ARCH) \
|
|
|
|
--prefix=/usr \
|
2009-03-05 14:48:29 +01:00
|
|
|
--openssldir=/etc/ssl \
|
2008-09-24 11:10:06 +02:00
|
|
|
threads \
|
|
|
|
shared \
|
|
|
|
no-idea \
|
|
|
|
no-mdc2 \
|
|
|
|
no-rc5 \
|
|
|
|
zlib-dynamic \
|
2007-04-16 20:51:20 +02:00
|
|
|
)
|
2009-04-28 20:30:06 +02:00
|
|
|
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(OPENSSL_DIR)/Makefile
|
|
|
|
$(SED) "s:-O[0-9]:$(TARGET_CFLAGS):" $(OPENSSL_DIR)/Makefile
|
2008-09-24 11:10:06 +02:00
|
|
|
touch $@
|
2003-11-12 10:31:12 +01:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
$(OPENSSL_TARGET_BUILD):
|
|
|
|
$(MAKE1) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
|
|
|
|
$(MAKE1) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared
|
|
|
|
touch $@
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2008-09-24 11:10:06 +02:00
|
|
|
$(OPENSSL_HOOK_POST_INSTALL):
|
|
|
|
$(if $(BR2_HAVE_DEVFILES),,rm -rf $(TARGET_DIR)/usr/lib/ssl)
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL_BIN),y)
|
2009-04-28 20:30:15 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/openssl
|
2008-09-24 11:10:06 +02:00
|
|
|
else
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/openssl
|
2005-02-10 04:06:39 +01:00
|
|
|
endif
|
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
|
|
|
|
for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \
|
|
|
|
do chmod +w $$i; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$i; done
|
2008-09-24 11:10:06 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/engines
|
2009-03-15 08:28:06 +01:00
|
|
|
else
|
|
|
|
chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/engines/lib*.so
|
2005-07-12 21:53:12 +02:00
|
|
|
endif
|
2008-09-24 11:10:06 +02:00
|
|
|
touch $@
|
2009-04-28 20:30:20 +02:00
|
|
|
|
|
|
|
$(OPENSSL_TARGET_UNINSTALL):
|
|
|
|
$(call MESSAGE,"Uninstalling")
|
|
|
|
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)
|
|
|
|
rm -f $(OPENSSL_TARGET_INSTALL_TARGET) $(OPENSSL_HOOK_POST_INSTALL)
|