From 98e7fe9c67452905a78672e4c62a453ab6615b2e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 6 Mar 2012 22:03:37 +0200 Subject: [PATCH] Use mingw macros without leading underscore --- mingw-openssl.spec | 81 +++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/mingw-openssl.spec b/mingw-openssl.spec index 023d1f8..aee7019 100644 --- a/mingw-openssl.spec +++ b/mingw-openssl.spec @@ -1,6 +1,6 @@ -%global __strip %{_mingw32_strip} -%global __objdump %{_mingw32_objdump} -%define __debug_install_post %{_mingw32_debug_install_post} +%global __strip %{mingw32_strip} +%global __objdump %{mingw32_objdump} +%define __debug_install_post %{mingw32_debug_install_post} # For the curious: # 0.9.5a soversion = 0 @@ -154,7 +154,7 @@ Requires: mingw32-openssl = %{version}-%{release} Static version of the MinGW port of the OpenSSL toolkit. -%{?_mingw32_debug_package} +%{?mingw32_debug_package} %prep @@ -202,7 +202,7 @@ Static version of the MinGW port of the OpenSSL toolkit. %patch102 -p1 -b .mingw-sfx # Use _mingw32_cflags instead of hardcoded ones -sed -i -e '/^"mingw"/ s/-fomit-frame-pointer -O3 -march=i486 -Wall/%{_mingw32_cflags}/' Configure +sed -i -e '/^"mingw"/ s/-fomit-frame-pointer -O3 -march=i486 -Wall/%{mingw32_cflags}/' Configure # Modify the various perl scripts to reference perl in the right location. perl util/perlpath.pl `dirname %{__perl}` @@ -215,16 +215,16 @@ make TABLE PERL=%{__perl} # NB: 'no-hw' is vital. MinGW cannot build the hardware drivers # and if you don't have this you'll get an obscure link error. ./Configure \ - --prefix=%{_mingw32_prefix} \ - --openssldir=%{_mingw32_sysconfdir}/pki/tls \ + --prefix=%{mingw32_prefix} \ + --openssldir=%{mingw32_sysconfdir}/pki/tls \ zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \ enable-cms enable-md2 no-idea no-mdc2 no-rc5 no-ec no-ecdh no-ecdsa \ no-capieng \ - no-hw --cross-compile-prefix=%{_mingw32_target}- \ - --enginesdir=%{_mingw32_libdir}/openssl/engines \ + no-hw --cross-compile-prefix=%{mingw32_target}- \ + --enginesdir=%{mingw32_libdir}/openssl/engines \ shared mingw # --with-krb5-flavor=MIT -# -I%{_mingw32_prefix}/kerberos/include -L%{_mingw32_prefix}/kerberos/%{_lib} +# -I%{mingw32_prefix}/kerberos/include -L%{mingw32_prefix}/kerberos/%{_lib} # Regenerate def files as we disabled some algorithms above perl util/mkdef.pl crypto ssl update @@ -251,7 +251,7 @@ WINEDEBUG=+loaddll export WINEDEBUG # Make sure we can find the installed DLLs. -WINEDLLPATH=%{_mingw32_bindir} +WINEDLLPATH=%{mingw32_bindir} export WINEDLLPATH # The tests run Wine and require an X server (but don't really use @@ -267,10 +267,10 @@ sleep 3 DISPLAY=$display export DISPLAY -make LDCMD=%{_mingw32_cc} -C test apps tests +make LDCMD=%{mingw32_cc} -C test apps tests # Disable this thread test, because we don't have pthread on Windows. -%{_mingw32_cc} -o openssl-thread-test \ +%{mingw32_cc} -o openssl-thread-test \ -I./include \ %-{_mingw32_cflags} \ %-{SOURCE8} \ @@ -305,63 +305,64 @@ fi %install -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} +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 file applink.c (#499934) -install -m644 ms/applink.c $RPM_BUILD_ROOT%{_mingw32_includedir}/openssl/applink.c +install -m644 ms/applink.c $RPM_BUILD_ROOT%{mingw32_includedir}/openssl/applink.c # 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 +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 +chmod 0755 $RPM_BUILD_ROOT%{mingw32_libdir}/libcrypto.dll.a +chmod 0755 $RPM_BUILD_ROOT%{mingw32_libdir}/libssl.dll.a # Install a makefile for generating keys and self-signed certs, and a script # for generating them on the fly. -mkdir -p $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/certs -install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/certs/Makefile -install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/certs/make-dummy-cert +mkdir -p $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs +install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/Makefile +install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/make-dummy-cert # Pick a CA script. -pushd $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/misc +pushd $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/misc mv CA.sh CA popd -mkdir -m700 $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/CA -mkdir -m700 $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/CA/private +mkdir -m700 $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/CA +mkdir -m700 $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/CA/private %files -n mingw32-openssl %doc LICENSE -%{_mingw32_bindir}/openssl.exe -%{_mingw32_bindir}/c_rehash -%{_mingw32_bindir}/libcrypto-%{soversion}.dll -%{_mingw32_bindir}/libssl-%{soversion}.dll +%{mingw32_bindir}/openssl.exe +%{mingw32_bindir}/c_rehash +%{mingw32_bindir}/libcrypto-%{soversion}.dll +%{mingw32_bindir}/libssl-%{soversion}.dll #{_mingw32_bindir}/.libcrypto*.hmac -%{_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 +%{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 %files -n mingw32-openssl-static -%{_mingw32_libdir}/libcrypto.a -%{_mingw32_libdir}/libssl.a +%{mingw32_libdir}/libcrypto.a +%{mingw32_libdir}/libssl.a %changelog * Tue Mar 06 2012 Kalev Lember - 1.0.0d-4 - Renamed the source package to mingw-openssl (#800443) - Modernize the spec file +- Use mingw macros without leading underscore * Mon Feb 27 2012 Erik van Pienbroek - 1.0.0d-3 - Rebuild against the mingw-w64 toolchain