%define __strip %{_mingw32_strip} %define __objdump %{_mingw32_objdump} %define _use_internal_dependency_generator 0 %define __find_requires %{_mingw32_findrequires} %define __find_provides %{_mingw32_findprovides} # Enable the tests. # These only work some of the time, but fail randomly at other times # (although I have had them complete a few times, so I don't think # there is any actual problem with the binaries). %define with_tests 0 Name: mingw32-openssl Version: 0.9.8g Release: 1%{?dist} Summary: MinGW port of the OpenSSL toolkit License: OpenSSL Group: Development/Libraries URL: http://www.openssl.org/ # Use the hobble-openssl script to create the source file. Source0: openssl-%{version}-usa.tar.bz2 Source1: hobble-openssl Source2: Makefile.certificate Source6: make-dummy-cert Source8: openssl-thread-test.c Source9: opensslconf-new.h Source10: opensslconf-new-warning.h # Patches from Fedora native package. Patch0: openssl-0.9.8g-redhat.patch Patch1: openssl-0.9.8a-defaults.patch Patch2: openssl-0.9.8a-link-krb5.patch Patch3: openssl-0.9.8g-soversion.patch Patch4: openssl-0.9.8a-enginesdir.patch Patch5: openssl-0.9.8a-no-rpath.patch Patch6: openssl-0.9.8b-test-use-localhost.patch Patch7: openssl-0.9.8g-shlib-version.patch Patch21: openssl-0.9.8b-aliasing-bug.patch Patch22: openssl-0.9.8b-x509-name-cmp.patch Patch23: openssl-0.9.8g-default-paths.patch Patch24: openssl-0.9.8g-no-extssl.patch Patch32: openssl-0.9.8g-ia64.patch Patch33: openssl-0.9.7f-ca-dir.patch Patch34: openssl-0.9.6-x509.patch Patch35: openssl-0.9.7-beta5-version-add-engines.patch Patch38: openssl-0.9.8a-reuse-cipher-change.patch # Disabled this because it uses getaddrinfo which is lacking on Windows. #Patch39: openssl-0.9.8g-ipv6-apps.patch Patch50: openssl-0.9.8g-speed-bug.patch Patch51: openssl-0.9.8g-bn-mul-bug.patch Patch52: openssl-0.9.8g-cve-2008-0891.patch Patch53: openssl-0.9.8g-cve-2008-1671.patch # MinGW-specific patches. Patch100: mingw32-openssl-0.9.8g-header-files.patch Patch101: mingw32-openssl-0.9.8g-configure.patch Patch102: mingw32-openssl-0.9.8g-shared.patch Patch103: mingw32-openssl-0.9.8g-global.patch Patch104: mingw32-openssl-0.9.8g-sfx.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: mingw32-filesystem >= 26 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw32-zlib BuildRequires: mktemp #BuildRequires: krb5-devel BuildRequires: perl BuildRequires: sed BuildRequires: /usr/bin/cmp BuildRequires: /usr/bin/rename # XXX Not really sure about this one. The build script uses # /usr/bin/makedepend which comes from imake. BuildRequires: imake # Required both to build, and to run the tests. # XXX This needs to be fixed - cross-compilation should not # require running executables. BuildRequires: wine %if %{with_tests} # Required to run the tests. BuildRequires: xorg-x11-server-Xvfb %endif #Requires: ca-certificates >= 2008-5 Requires: pkgconfig %description The OpenSSL toolkit provides support for secure communications between machines. OpenSSL includes a certificate management tool and shared libraries which provide various cryptographic algorithms and protocols. This package contains Windows (MinGW) libraries and development tools. %prep %setup -q -n openssl-%{version} %{SOURCE1} > /dev/null %patch0 -p1 -b .redhat %patch1 -p1 -b .defaults # Fix link line for libssl (bug #111154). %patch2 -p1 -b .krb5 %patch3 -p1 -b .soversion %patch4 -p1 -b .enginesdir %patch5 -p1 -b .no-rpath %patch6 -p1 -b .use-localhost %patch7 -p1 -b .shlib-version %patch21 -p1 -b .aliasing-bug %patch22 -p1 -b .name-cmp %patch23 -p1 -b .default-paths %patch24 -p1 -b .no-extssl %patch32 -p1 -b .ia64 #patch33 is applied after make test %patch34 -p1 -b .x509 %patch35 -p1 -b .version-add-engines %patch38 -p1 -b .cipher-change #%patch39 -p1 -b .ipv6-apps %patch50 -p1 -b .speed-bug %patch51 -p1 -b .bn-mul-bug %patch52 -p0 -b .srvname-crash %patch53 -p0 -b .srv-kex-crash %patch100 -p1 -b .mingw-header-files %patch101 -p1 -b .mingw-configure %patch102 -p1 -b .mingw-shared %patch103 -p1 -b .mingw-global %patch104 -p1 -b .mingw-sfx # Modify the various perl scripts to reference perl in the right location. perl util/perlpath.pl `dirname %{__perl}` # Generate a table with the compile settings for my perusal. touch Makefile make TABLE PERL=%{__perl} %build cat > gcc </dev/null 2>&1 ; then iconv -f ISO-8859-1 -t UTF-8 -o CHANGES.utf8 CHANGES && \ mv -f CHANGES.utf8 CHANGES fi %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir} mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}/openssl mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir} mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir} mkdir -p $RPM_BUILD_ROOT%{_mingw32_mandir} make INSTALL_PREFIX=$RPM_BUILD_ROOT install build-shared # Install the actual DLLs. install libcrypto-7.dll $RPM_BUILD_ROOT%{_mingw32_bindir} install libssl-7.dll $RPM_BUILD_ROOT%{_mingw32_bindir} # Remove static libraries but DON'T remove *.dll.a files. rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libcrypto.a rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libssl.a # I have no idea why it installs the manpages in /etc, but # we remove them anyway. rm -r $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/man # Set permissions on lib*.dll.a so that strip works. chmod 0755 $RPM_BUILD_ROOT%{_mingw32_libdir}/libcrypto.dll.a chmod 0755 $RPM_BUILD_ROOT%{_mingw32_libdir}/libssl.dll.a %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_mingw32_bindir}/openssl.exe %{_mingw32_bindir}/c_rehash %{_mingw32_bindir}/libcrypto-7.dll %{_mingw32_bindir}/libssl-7.dll %{_mingw32_libdir}/libcrypto.dll.a %{_mingw32_libdir}/libssl.dll.a %{_mingw32_libdir}/engines %{_mingw32_libdir}/pkgconfig/*.pc %{_mingw32_includedir}/openssl %config(noreplace) %{_mingw32_sysconfdir}/pki %changelog * Tue Sep 30 2008 Richard W.M. Jones - 0.9.8g-1 - Initial RPM release.