%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define openssldir /var/ssl-rpm %define majorver 1.0.2 Summary: Secure Sockets Layer and cryptography libraries and tools Name: openssl Version: %{majorver}l %if %{p7build} Release: 1.p7 %else Release: 1 %endif Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz Source1: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz.asc Source2: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz.sha1 Source3: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz.sha256 Source4: libcrypto.so.0.9.7-aix32 Source5: libcrypto.so.0.9.7-aix64 Source6: libssl.so.0.9.7-aix32 Source7: libssl.so.0.9.7-aix64 Source8: libcrypto.so.0.9.8-aix32 Source9: libcrypto.so.0.9.8-aix64 Source10: libssl.so.0.9.8-aix32 Source11: libssl.so.0.9.8-aix64 Source12: libcrypto.so.1.0.0-aix32 Source13: libcrypto.so.1.0.0-aix64 Source14: libssl.so.1.0.0-aix32 Source15: libssl.so.1.0.0-aix64 Source16: libcrypto.so.1.0.1-aix32 Source17: libcrypto.so.1.0.1-aix64 Source18: libssl.so.1.0.1-aix32 Source19: libssl.so.1.0.1-aix64 Patch0: %{name}-%{version}-Configure.patch License: OpenSSL License Group: System Environment/Libraries Provides: SSL URL: http://www.openssl.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Obsoletes: openssl64 %define _prefix64 %{_prefix}/64 %define _libdir64 %{_prefix}/lib64 BuildRequires: make %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, fully 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. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL tookit and its related documentation. OpenSSL is based on the excellent SSLeay library developed from Eric A. Young and Tim J. Hudson. OpenSSL is licensed under the OpenSSL License, included in this package. This package contains the base OpenSSL cryptography and SSL/TLS libraries and tools. You should also install a pseudo-random number generator such as EGD or prngd if you do not have a /dev/urandom and /dev/random. The library is available as 32-bit and 64-bit. %package devel Summary: Secure Sockets Layer and cryptography static libraries and headers Group: Development/Libraries Requires: %{name} = %{version} Obsoletes: openssl64-devel %description devel The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, fully 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. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL tookit and its related documentation. OpenSSL is based on the excellent SSLeay library developed from Eric A. Young and Tim J. Hudson. OpenSSL is licensed under the OpenSSL License, included in this package. This package contains the the OpenSSL cryptography and SSL/TLS static libraries and header files required when developing applications. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %package doc Summary: OpenSSL miscellaneous files Group: Documentation Requires: %{name} = %{version} Obsoletes: openssl64-doc %description doc The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, fully 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. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL tookit and its related documentation. OpenSSL is based on the excellent SSLeay library developed from Eric A. Young and Tim J. Hudson. OpenSSL is licensed under the OpenSSL License, included in this package. This package contains the the OpenSSL cryptography and SSL/TLS extra documentation and POD files from which the man pages were produced. %prep %setup -q %patch0 %build /usr/bin/perl util/perlpath.pl /usr/bin/perl export CC="xlc_r" export RM="/usr/bin/rm -f" # first build the 64-bit version export OBJECT_MODE=64 ./Configure \ no-idea no-mdc2 no-rc5 \ -DSSL_ALLOW_ADH \ threads \ no-shared \ zlib-dynamic \ --prefix=%{_prefix} \ --openssldir=%{openssldir} \ %if %{p7build} aix64p7-xlc_r %else no-asm \ aix64-xlc_r %endif gmake depend gmake build_libs CreateExportList -X64 libcrypto.exp libcrypto.a ${CC} -qmkshrobj libcrypto.a -o libcrypto.so.%{majorver} -bE:libcrypto.exp rm -f libcrypto.a libcrypto.exp /usr/bin/ar -rv libcrypto.a libcrypto.so.%{majorver} CreateExportList -X64 libssl.exp libssl.a ${CC} -qmkshrobj libssl.a -o libssl.so.%{majorver} -bE:libssl.exp -L. -lcrypto -blibpath:/opt/freeware/lib:/usr/lib:/lib rm -f libssl.a libssl.exp /usr/bin/ar -rv libssl.a libssl.so.%{majorver} gmake # apps/openssl still has the wrong shared library paths, we have to relink it # this is an ugly hack: # In order to get the correct shared libraries linked they must reside before # linking in /opt/freeware/lib, e.g. we have to copy them manually there! rm -f apps/openssl gmake LIBSSL="-L/opt/freeware/lib -lssl" LIBCRYPTO="-L/opt/freeware/lib -lcrypto" mkdir -p 64 mv apps/openssl libcrypto.so.%{majorver} libssl.so.%{majorver} 64/ gmake clean slibclean ####--------------------- # now build the 32-bit version export OBJECT_MODE=32 ./Configure \ no-idea no-mdc2 no-rc5 \ -DSSL_ALLOW_ADH \ threads \ no-shared \ zlib-dynamic \ --prefix=%{_prefix} \ --openssldir=%{openssldir} \ %if %{p7build} aixp7-xlc_r %else no-asm \ aix-xlc_r %endif gmake depend gmake build_libs CreateExportList -X32 libcrypto.exp libcrypto.a ${CC} -qmkshrobj libcrypto.a -o libcrypto.so.%{majorver} -bE:libcrypto.exp rm -f libcrypto.a libcrypto.exp /usr/bin/ar -rv libcrypto.a libcrypto.so.%{majorver} CreateExportList -X32 libssl.exp libssl.a ${CC} -qmkshrobj libssl.a -o libssl.so.%{majorver} -bE:libssl.exp -L. -lcrypto -blibpath:/opt/freeware/lib:/usr/lib:/lib rm -f libssl.a libssl.exp /usr/bin/ar -rv libssl.a libssl.so.%{majorver} gmake slibclean # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q libcrypto.a 64/libcrypto.so.%{majorver} /usr/bin/ar -X64 -q libssl.a 64/libssl.so.%{majorver} # Add the older 0.9.7l, 0.9.8zh, 1.0.0t and 1.0.1t shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE4} libcrypto.so.0.9.7 /usr/bin/strip -X32 -e libcrypto.so.0.9.7 /usr/bin/ar -X32 -q libcrypto.a libcrypto.so.0.9.7 cp %{SOURCE8} libcrypto.so.0.9.8 /usr/bin/strip -X32 -e libcrypto.so.0.9.8 /usr/bin/ar -X32 -q libcrypto.a libcrypto.so.0.9.8 cp %{SOURCE12} libcrypto.so.1.0.0 /usr/bin/strip -X32 -e libcrypto.so.1.0.0 /usr/bin/ar -X32 -q libcrypto.a libcrypto.so.1.0.0 cp %{SOURCE16} libcrypto.so.1.0.1 /usr/bin/strip -X32 -e libcrypto.so.1.0.1 /usr/bin/ar -X32 -q libcrypto.a libcrypto.so.1.0.1 cp %{SOURCE5} libcrypto.so.0.9.7 /usr/bin/strip -X64 -e libcrypto.so.0.9.7 /usr/bin/ar -X64 -q libcrypto.a libcrypto.so.0.9.7 cp %{SOURCE9} libcrypto.so.0.9.8 /usr/bin/strip -X64 -e libcrypto.so.0.9.8 /usr/bin/ar -X64 -q libcrypto.a libcrypto.so.0.9.8 cp %{SOURCE13} libcrypto.so.1.0.0 /usr/bin/strip -X64 -e libcrypto.so.1.0.0 /usr/bin/ar -X64 -q libcrypto.a libcrypto.so.1.0.0 cp %{SOURCE17} libcrypto.so.1.0.1 /usr/bin/strip -X64 -e libcrypto.so.1.0.1 /usr/bin/ar -X64 -q libcrypto.a libcrypto.so.1.0.1 cp %{SOURCE6} libssl.so.0.9.7 /usr/bin/strip -X32 -e libssl.so.0.9.7 /usr/bin/ar -X32 -q libssl.a libssl.so.0.9.7 cp %{SOURCE10} libssl.so.0.9.8 /usr/bin/strip -X32 -e libssl.so.0.9.8 /usr/bin/ar -X32 -q libssl.a libssl.so.0.9.8 cp %{SOURCE14} libssl.so.1.0.0 /usr/bin/strip -X32 -e libssl.so.1.0.0 /usr/bin/ar -X32 -q libssl.a libssl.so.1.0.0 cp %{SOURCE18} libssl.so.1.0.1 /usr/bin/strip -X32 -e libssl.so.1.0.1 /usr/bin/ar -X32 -q libssl.a libssl.so.1.0.1 cp %{SOURCE7} libssl.so.0.9.7 /usr/bin/strip -X64 -e libssl.so.0.9.7 /usr/bin/ar -X64 -q libssl.a libssl.so.0.9.7 cp %{SOURCE11} libssl.so.0.9.8 /usr/bin/strip -X64 -e libssl.so.0.9.8 /usr/bin/ar -X64 -q libssl.a libssl.so.0.9.8 cp %{SOURCE15} libssl.so.1.0.0 /usr/bin/strip -X64 -e libssl.so.1.0.0 /usr/bin/ar -X64 -q libssl.a libssl.so.1.0.0 cp %{SOURCE19} libssl.so.1.0.1 /usr/bin/strip -X64 -e libssl.so.1.0.1 /usr/bin/ar -X64 -q libssl.a libssl.so.1.0.1 # apps/openssl still has the wrong shared library paths, we have to relink it # this is an ugly hack: # In order to get the correct shared libraries linked they must reside before # linking in /opt/freeware/lib, e.g. we have to copy them manually there! rm -f apps/openssl gmake LIBSSL="-L/opt/freeware/lib -lssl" LIBCRYPTO="-L/opt/freeware/lib -lcrypto" %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake INSTALL_PREFIX=${RPM_BUILD_ROOT} MANDIR=%{_mandir} install cp 64/openssl ${RPM_BUILD_ROOT}%{_bindir}/openssl64 chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/openssl64 strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : # Make backwards-compatibility symlink to ssleay ln -s %{_bindir}/openssl ${RPM_BUILD_ROOT}%{_bindir}/ssleay ln -s %{_bindir}/openssl64 ${RPM_BUILD_ROOT}%{_bindir}/ssleay64 # add 32-bit run-time-linker libraries cd ${RPM_BUILD_ROOT}%{_libdir} /usr/bin/ar -X32 -x libcrypto.a /usr/bin/ar -X32 -x libssl.a ln -s libcrypto.so.%{majorver} libcrypto.so ln -s libssl.so.%{majorver} libssl.so # add 64-bit run-time-linker libraries mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/ cd ${RPM_BUILD_ROOT}%{_libdir64} /usr/bin/ar -X64 -x ../lib/libcrypto.a /usr/bin/ar -X64 -x ../lib/libssl.a ln -s libcrypto.so.%{majorver} libcrypto.so ln -s libssl.so.%{majorver} libssl.so ( cd ${RPM_BUILD_ROOT} for dir in bin lib lib64 include do mkdir -p usr/linux/${dir} cd usr/linux/${dir} ln -sf ../../..%{_prefix}/${dir}/* . cd - done # change these to be full-path links cd usr/linux/lib rm ./libcrypto.* ./libssl.* ln -sf %{_libdir}/libcrypto.a . ln -sf %{_libdir}/libcrypto.so . ln -sf %{_libdir}/libcrypto.so.%{majorver} . ln -sf %{_libdir}/libssl.a . ln -sf %{_libdir}/libssl.so . ln -sf %{_libdir}/libssl.so.%{majorver} . cd ../lib64 rm ./libcrypto.* ./libssl.* ln -sf %{_libdir64}/libcrypto.so . ln -sf %{_libdir64}/libcrypto.so.%{majorver} . ln -sf %{_libdir64}/libssl.so . ln -sf %{_libdir64}/libssl.so.%{majorver} . cd - ) # add links for 64-bit library members ( mkdir -p ${RPM_BUILD_ROOT}%{_prefix64}/lib cd ${RPM_BUILD_ROOT}%{_prefix64}/lib ln -s ../../lib/*.a . ) # rename ${RPM_BUILD_ROOT}%{_mandir}/man3/threads.3 as it might conflict with # man3/threads.3 from perl cd ${RPM_BUILD_ROOT}%{_mandir}/man3 mv -f threads.3 threads.3ssl %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGES CHANGES.SSLeay LICENSE NEWS README %dir %{openssldir} %config %attr(0644,root,system) %{openssldir}/openssl.cnf %dir %attr(0755,root,system) %{openssldir}/certs %dir %attr(0755,root,system) %{openssldir}/misc %dir %attr(0750,root,system) %{openssldir}/private %{openssldir}/misc/* %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %dir %attr(755,bin,bin) %{_prefix64} %dir %attr(755,bin,bin) %{_prefix64}/lib %{_prefix64}/lib/*.a %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man7/* /usr/linux/bin/* /usr/linux/lib/*.a /usr/linux/lib/*.so* /usr/linux/lib64/*.so* %files devel %defattr(-,root,system) %doc CHANGES CHANGES.SSLeay LICENSE NEWS README %{_includedir}/* %{_libdir}/pkgconfig/* /usr/linux/include/* %files doc %defattr(-,root,system) %doc CHANGES CHANGES.SSLeay LICENSE NEWS README %doc doc %{_mandir}/man3/* %changelog * Mon May 29 2017 Michael Perzl - 1.0.2l-1 - updated to version 1.0.2l * Fri Jan 27 2017 Michael Perzl - 1.0.2k-1 - updated to version 1.0.2k * Sat Oct 30 2016 Michael Perzl - 1.0.2j-2 - rebuilt to avoid the -bexpall linker flag, use export files instead * Fri Sep 30 2016 Michael Perzl - 1.0.2j-1 - updated to version 1.0.2j * Mon Sep 26 2016 Michael Perzl - 1.0.2i-1 - updated to version 1.0.2i * Wed May 25 2016 Michael Perzl - 1.0.2h-1 - updated to version 1.0.2h * Tue May 03 2016 Michael Perzl - 1.0.1t-1 - updated to version 1.0.1t * Tue Mar 01 2016 Michael Perzl - 1.0.1s-1 - updated to version 1.0.1s * Fri Feb 05 2016 Michael Perzl - 1.0.1r-2 - avoid conflicts with IBM's own openssl.base bff file * Thu Jan 28 2016 Michael Perzl - 1.0.1r-1 - updated to version 1.0.1r * Fri Dec 25 2015 Michael Perzl - 1.0.1q-1 - updated to version 1.0.1q * Fri Jul 10 2015 Michael Perzl - 1.0.1p-1 - updated to version 1.0.1p * Fri Jun 19 2015 Michael Perzl - 1.0.1o-1 - updated to version 1.0.1o * Fri Mar 23 2015 Michael Perzl - 1.0.1m-1 - updated to version 1.0.1m * Fri Jan 23 2015 Michael Perzl - 1.0.1l-1 - updated to version 1.0.1l * Fri Jan 23 2015 Michael Perzl - 1.0.1k-1 - updated to version 1.0.1k * Wed Oct 22 2014 Michael Perzl - 1.0.1j-1 - updated to version 1.0.1j * Thu Aug 14 2014 Michael Perzl - 1.0.1i-1 - updated to version 1.0.1i * Thu Jun 12 2014 Michael Perzl - 1.0.1h-1 - updated to version 1.0.1h * Tue Apr 08 2014 Michael Perzl - 1.0.1g-1 - updated to version 1.0.1g * Fri Jan 10 2014 Michael Perzl - 1.0.1f-1 - updated to version 1.0.1f * Mon Mar 25 2013 Michael Perzl - 1.0.1e-2 - changed the way how the shared objects are generated as some functions where not exported otherwise * Mon Feb 18 2013 Michael Perzl - 1.0.1e-1 - updated to version 1.0.1e * Tue Feb 05 2013 Michael Perzl - 1.0.1d-1 - updated to version 1.0.1d * Sun Jun 10 2012 Michael Perzl - 1.0.1c-1 - updated to version 1.0.1c * Fri May 11 2012 Michael Perzl - 1.0.0j-1 - updated to version 1.0.0j * Mon Apr 30 2012 Michael Perzl - 1.0.0i-1 - updated to version 1.0.0i * Wed Mar 14 2012 Michael Perzl - 1.0.0h-1 - updated to version 1.0.0h * Thu Jan 19 2012 Michael Perzl - 1.0.0g-1 - updated to version 1.0.0g * Sat Jan 07 2012 Michael Perzl - 1.0.0f-1 - updated to version 1.0.0f * Wed Sep 07 2011 Michael Perzl - 1.0.0e-1 - updated to version 1.0.0e * Thu Feb 10 2011 Michael Perzl - 1.0.0d-1 - updated to version 1.0.0d * Tue Dec 07 2010 Michael Perzl - 1.0.0c-1 - updated to version 1.0.0c * Wed Nov 17 2010 Michael Perzl - 1.0.0b-1 - updated to version 1.0.0b * Wed Jun 02 2010 Michael Perzl - 1.0.0a-1 - updated to version 1.0.0a, added RTL (run-time-linker) versions * Mon Mar 29 2010 Michael Perzl - 1.0.0-1 - updated to version 1.0.0 * Mon Mar 29 2010 Michael Perzl - 0.9.8n-1 - updated to version 0.9.8n * Wed Mar 03 2010 Michael Perzl - 0.9.8m-1 - updated to version 0.9.8m * Sun Nov 08 2009 Michael Perzl - 0.9.8l-1 - updated to version 0.9.8l * Fri Mar 27 2009 Michael Perzl - 0.9.8k-1 - updated to version 0.9.8k * Thu Jan 08 2009 Michael Perzl - 0.9.8j-1 - updated to version 0.9.8j * Sat Oct 11 2008 Michael Perzl - 0.9.8i-1 - updated to version 0.9.8i * Wed May 14 2008 Michael Perzl - 0.9.8h-1 - first version for AIX V5.1 and higher - kept compatible to the IBM AIX Toolbox for Linux Applications version