Use mingw macros without leading underscore

This commit is contained in:
Kalev Lember 2012-03-06 22:03:37 +02:00
parent d93b9b251a
commit 98e7fe9c67

View File

@ -1,6 +1,6 @@
%global __strip %{_mingw32_strip} %global __strip %{mingw32_strip}
%global __objdump %{_mingw32_objdump} %global __objdump %{mingw32_objdump}
%define __debug_install_post %{_mingw32_debug_install_post} %define __debug_install_post %{mingw32_debug_install_post}
# For the curious: # For the curious:
# 0.9.5a soversion = 0 # 0.9.5a soversion = 0
@ -154,7 +154,7 @@ Requires: mingw32-openssl = %{version}-%{release}
Static version of the MinGW port of the OpenSSL toolkit. Static version of the MinGW port of the OpenSSL toolkit.
%{?_mingw32_debug_package} %{?mingw32_debug_package}
%prep %prep
@ -202,7 +202,7 @@ Static version of the MinGW port of the OpenSSL toolkit.
%patch102 -p1 -b .mingw-sfx %patch102 -p1 -b .mingw-sfx
# Use _mingw32_cflags instead of hardcoded ones # 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. # Modify the various perl scripts to reference perl in the right location.
perl util/perlpath.pl `dirname %{__perl}` 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 # 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. # and if you don't have this you'll get an obscure link error.
./Configure \ ./Configure \
--prefix=%{_mingw32_prefix} \ --prefix=%{mingw32_prefix} \
--openssldir=%{_mingw32_sysconfdir}/pki/tls \ --openssldir=%{mingw32_sysconfdir}/pki/tls \
zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \ 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 \ enable-cms enable-md2 no-idea no-mdc2 no-rc5 no-ec no-ecdh no-ecdsa \
no-capieng \ no-capieng \
no-hw --cross-compile-prefix=%{_mingw32_target}- \ no-hw --cross-compile-prefix=%{mingw32_target}- \
--enginesdir=%{_mingw32_libdir}/openssl/engines \ --enginesdir=%{mingw32_libdir}/openssl/engines \
shared mingw shared mingw
# --with-krb5-flavor=MIT # --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 # Regenerate def files as we disabled some algorithms above
perl util/mkdef.pl crypto ssl update perl util/mkdef.pl crypto ssl update
@ -251,7 +251,7 @@ WINEDEBUG=+loaddll
export WINEDEBUG export WINEDEBUG
# Make sure we can find the installed DLLs. # Make sure we can find the installed DLLs.
WINEDLLPATH=%{_mingw32_bindir} WINEDLLPATH=%{mingw32_bindir}
export WINEDLLPATH export WINEDLLPATH
# The tests run Wine and require an X server (but don't really use # The tests run Wine and require an X server (but don't really use
@ -267,10 +267,10 @@ sleep 3
DISPLAY=$display DISPLAY=$display
export 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. # 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 \ -I./include \
%-{_mingw32_cflags} \ %-{_mingw32_cflags} \
%-{SOURCE8} \ %-{SOURCE8} \
@ -305,63 +305,64 @@ fi
%install %install
mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir} mkdir -p $RPM_BUILD_ROOT%{mingw32_libdir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}/openssl mkdir -p $RPM_BUILD_ROOT%{mingw32_libdir}/openssl
mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir} mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir} mkdir -p $RPM_BUILD_ROOT%{mingw32_includedir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_mandir} mkdir -p $RPM_BUILD_ROOT%{mingw32_mandir}
make INSTALL_PREFIX=$RPM_BUILD_ROOT install build-shared make INSTALL_PREFIX=$RPM_BUILD_ROOT install build-shared
# Install the file applink.c (#499934) # 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 # I have no idea why it installs the manpages in /etc, but
# we remove them anyway. # 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. # 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}/libcrypto.dll.a
chmod 0755 $RPM_BUILD_ROOT%{_mingw32_libdir}/libssl.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 # Install a makefile for generating keys and self-signed certs, and a script
# for generating them on the fly. # for generating them on the fly.
mkdir -p $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/certs mkdir -p $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/tls/certs/Makefile 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 install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/make-dummy-cert
# Pick a CA script. # 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 mv CA.sh CA
popd popd
mkdir -m700 $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/pki/CA 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/private
%files -n mingw32-openssl %files -n mingw32-openssl
%doc LICENSE %doc LICENSE
%{_mingw32_bindir}/openssl.exe %{mingw32_bindir}/openssl.exe
%{_mingw32_bindir}/c_rehash %{mingw32_bindir}/c_rehash
%{_mingw32_bindir}/libcrypto-%{soversion}.dll %{mingw32_bindir}/libcrypto-%{soversion}.dll
%{_mingw32_bindir}/libssl-%{soversion}.dll %{mingw32_bindir}/libssl-%{soversion}.dll
#{_mingw32_bindir}/.libcrypto*.hmac #{_mingw32_bindir}/.libcrypto*.hmac
%{_mingw32_libdir}/libcrypto.dll.a %{mingw32_libdir}/libcrypto.dll.a
%{_mingw32_libdir}/libssl.dll.a %{mingw32_libdir}/libssl.dll.a
%{_mingw32_libdir}/engines %{mingw32_libdir}/engines
%{_mingw32_libdir}/pkgconfig/*.pc %{mingw32_libdir}/pkgconfig/*.pc
%{_mingw32_includedir}/openssl %{mingw32_includedir}/openssl
%config(noreplace) %{_mingw32_sysconfdir}/pki %config(noreplace) %{mingw32_sysconfdir}/pki
%files -n mingw32-openssl-static %files -n mingw32-openssl-static
%{_mingw32_libdir}/libcrypto.a %{mingw32_libdir}/libcrypto.a
%{_mingw32_libdir}/libssl.a %{mingw32_libdir}/libssl.a
%changelog %changelog
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.0.0d-4 * Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.0.0d-4
- Renamed the source package to mingw-openssl (#800443) - Renamed the source package to mingw-openssl (#800443)
- Modernize the spec file - Modernize the spec file
- Use mingw macros without leading underscore
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0d-3 * Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0d-3
- Rebuild against the mingw-w64 toolchain - Rebuild against the mingw-w64 toolchain