Blame SPECS/mingw-zlib.spec

7f5b0a
%?mingw_package_header
7f5b0a
7f5b0a
Name:           mingw-zlib
7f5b0a
Version:        1.2.8
bb266f
Release:        10%{?dist}
7f5b0a
Summary:        MinGW Windows zlib compression library
7f5b0a
7f5b0a
License:        zlib
7f5b0a
Group:          Development/Libraries
7f5b0a
URL:            http://www.zlib.net/
7f5b0a
Source0:        http://www.zlib.net/zlib-%{version}.tar.gz
7f5b0a
# Replace the zlib build system with an autotools based one
7f5b0a
Patch3:         mingw32-zlib-1.2.7-autotools.patch
7f5b0a
# The .def file contains an empty LIBRARY line which isn't valid
7f5b0a
Patch5:         zlib-1.2.7-use-correct-def-file.patch
7f5b0a
# Libtool tries to make a libz-1.dll while we expect zlib1.dll
7f5b0a
# Force this by hacking the ltmain.sh
7f5b0a
Patch6:         mingw32-zlib-create-zlib1-dll.patch
7f5b0a
bb266f
# Backported from zlib-1.2.11-CVE-2018-25032.patch
bb266f
# https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531
bb266f
Patch7:         zlib-1.2.8-CVE-2018-25032.patch
bb266f
7f5b0a
BuildArch:      noarch
7f5b0a
ExclusiveArch: %{ix86} x86_64
7f5b0a
7f5b0a
BuildRequires:  mingw32-filesystem >= 95
7f5b0a
BuildRequires:  mingw32-gcc
7f5b0a
BuildRequires:  mingw32-binutils
7f5b0a
7f5b0a
BuildRequires:  mingw64-filesystem >= 95
7f5b0a
BuildRequires:  mingw64-gcc
7f5b0a
BuildRequires:  mingw64-binutils
7f5b0a
7f5b0a
BuildRequires:  perl-interpreter
7f5b0a
BuildRequires:  autoconf
7f5b0a
BuildRequires:  automake
7f5b0a
BuildRequires:  libtool
7f5b0a
7f5b0a
7f5b0a
%description
7f5b0a
MinGW Windows zlib compression library.
7f5b0a
7f5b0a
7f5b0a
# Win32
7f5b0a
%package -n mingw32-zlib
7f5b0a
Summary:        MinGW Windows zlib compression library for the win32 target
7f5b0a
7f5b0a
%description -n mingw32-zlib
7f5b0a
MinGW Windows zlib compression library for the win32 target.
7f5b0a
7f5b0a
7f5b0a
%package -n mingw32-zlib-static
7f5b0a
Summary:        Static libraries for mingw32-zlib development.
7f5b0a
Group:          Development/Libraries
7f5b0a
Requires:       mingw32-zlib = %{version}-%{release}
7f5b0a
7f5b0a
%description -n mingw32-zlib-static
7f5b0a
The mingw32-zlib-static package contains static library for mingw32-zlib development.
7f5b0a
7f5b0a
7f5b0a
%package -n mingw32-minizip
7f5b0a
Summary:        Minizip manipulates files from a .zip archive
7f5b0a
Group:          Development/Libraries
7f5b0a
Requires:       mingw32-zlib = %{version}-%{release}
7f5b0a
7f5b0a
%description -n  mingw32-minizip
7f5b0a
MinGW Minizip manipulates files from a .zip archive.
7f5b0a
7f5b0a
# Win64
7f5b0a
%package -n mingw64-zlib
7f5b0a
Summary:        MinGW Windows zlib compression library for the win64 target
7f5b0a
7f5b0a
%description -n mingw64-zlib
7f5b0a
MinGW Windows zlib compression library for the win64 target.
7f5b0a
7f5b0a
%package -n mingw64-zlib-static
7f5b0a
Summary:        Static libraries for mingw64-zlib development
7f5b0a
Requires:       mingw64-zlib = %{version}-%{release}
7f5b0a
7f5b0a
%description -n mingw64-zlib-static
7f5b0a
The mingw64-zlib-static package contains static library for mingw64-zlib development.
7f5b0a
7f5b0a
%package -n mingw64-minizip
7f5b0a
Summary:        Minizip manipulates files from a .zip archive
7f5b0a
Requires:       mingw64-zlib = %{version}-%{release}
7f5b0a
7f5b0a
%description -n mingw64-minizip
7f5b0a
MinGW Minizip manipulates files from a .zip archive.
7f5b0a
7f5b0a
7f5b0a
%?mingw_debug_package
7f5b0a
7f5b0a
7f5b0a
%prep
7f5b0a
%setup -q -n zlib-%{version}
7f5b0a
%patch3 -p1 -b .atools
7f5b0a
%patch5 -p1 -b .def
7f5b0a
# patch cannot create an empty dir
7f5b0a
mkdir m4
7f5b0a
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
7f5b0a
7f5b0a
autoreconf --install --force
7f5b0a
7f5b0a
%patch6 -p0 -b .libtool
bb266f
%patch7 -p1 -b .CVE-2018-25032
7f5b0a
7f5b0a
7f5b0a
%build
7f5b0a
%mingw_configure
7f5b0a
%mingw_make %{?_smp_mflags}
7f5b0a
7f5b0a
7f5b0a
%install
7f5b0a
# Libtool tries to install a file called libz-1.dll
7f5b0a
# but this isn't created anymore due to patch #6
7f5b0a
# Fool libtool until a proper fix has been found
7f5b0a
touch build_win32/.libs/libz-1.dll build_win64/.libs/libz-1.dll
7f5b0a
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
7f5b0a
7f5b0a
# Manually install the correct zlib.dll
7f5b0a
install -m 0644 build_win32/.libs/zlib1.dll $RPM_BUILD_ROOT%{mingw32_bindir}/
7f5b0a
install -m 0644 build_win64/.libs/zlib1.dll $RPM_BUILD_ROOT%{mingw64_bindir}/
7f5b0a
7f5b0a
# Install the pkgconfig file
7f5b0a
install -m 0644 build_win32/zlib.pc $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/
7f5b0a
install -m 0644 build_win64/zlib.pc $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/
7f5b0a
7f5b0a
# Drop the fake libz-1.dll
7f5b0a
rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/libz-1.dll
7f5b0a
rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/libz-1.dll
7f5b0a
7f5b0a
# Drop all .la files
7f5b0a
find $RPM_BUILD_ROOT -name "*.la" -delete
7f5b0a
7f5b0a
# Drop the man pages
7f5b0a
rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
7f5b0a
rm -rf $RPM_BUILD_ROOT%{mingw64_mandir}
7f5b0a
7f5b0a
7f5b0a
# Win32
7f5b0a
%files -n mingw32-zlib
7f5b0a
%{mingw32_includedir}/zconf.h
7f5b0a
%{mingw32_includedir}/zlib.h
7f5b0a
%{mingw32_libdir}/libz.dll.a
7f5b0a
%{mingw32_bindir}/zlib1.dll
7f5b0a
%{mingw32_libdir}/pkgconfig/zlib.pc
7f5b0a
7f5b0a
%files -n mingw32-zlib-static
7f5b0a
%{mingw32_libdir}/libz.a
7f5b0a
7f5b0a
%files -n mingw32-minizip
7f5b0a
%{mingw32_libdir}/libminizip.dll.a
7f5b0a
%{mingw32_bindir}/libminizip-1.dll
7f5b0a
%dir %{mingw32_includedir}/minizip
7f5b0a
%{mingw32_includedir}/minizip/*.h
7f5b0a
%{mingw32_libdir}/pkgconfig/minizip.pc
7f5b0a
7f5b0a
# Win64
7f5b0a
%files -n mingw64-zlib
7f5b0a
%{mingw64_includedir}/zconf.h
7f5b0a
%{mingw64_includedir}/zlib.h
7f5b0a
%{mingw64_libdir}/libz.dll.a
7f5b0a
%{mingw64_bindir}/zlib1.dll
7f5b0a
%{mingw64_libdir}/pkgconfig/zlib.pc
7f5b0a
7f5b0a
%files -n mingw64-zlib-static
7f5b0a
%{mingw64_libdir}/libz.a
7f5b0a
7f5b0a
%files -n mingw64-minizip
7f5b0a
%{mingw64_libdir}/libminizip.dll.a
7f5b0a
%{mingw64_bindir}/libminizip-1.dll
7f5b0a
%dir %{mingw64_includedir}/minizip
7f5b0a
%{mingw64_includedir}/minizip/*.h
7f5b0a
%{mingw64_libdir}/pkgconfig/minizip.pc
7f5b0a
7f5b0a
7f5b0a
%changelog
bb266f
* Mon May 09 2022 Uri Lublin <uril@redhat.com> - 1.2.8-10
bb266f
- Fix CVE-2018-25032
bb266f
  Resolves: rhbz#2068370
bb266f
7f5b0a
* Tue Aug 14 2018 Victor Toso <victortoso@redhat.com> - 1.2.8-9
7f5b0a
- ExclusiveArch: i686, x86_64
7f5b0a
- Related: rhbz#1615874
7f5b0a
7f5b0a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-8
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7f5b0a
7f5b0a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-7
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7f5b0a
7f5b0a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-6
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7f5b0a
7f5b0a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-5
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7f5b0a
7f5b0a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-4
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7f5b0a
7f5b0a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-3
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7f5b0a
7f5b0a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-2
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7f5b0a
7f5b0a
* Sat Jul 13 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.8-1
7f5b0a
- Update to 1.2.8
7f5b0a
7f5b0a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-2
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7f5b0a
7f5b0a
* Thu Nov 22 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.7-1
7f5b0a
- Update to 1.2.7
7f5b0a
7f5b0a
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-11
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7f5b0a
7f5b0a
* Sat Mar 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-10
7f5b0a
- Added win64 support
7f5b0a
- Simplified the build process by using autotools and a hacked version of libtool
7f5b0a
- Made the package compliant with the new MinGW packaging guidelines
7f5b0a
7f5b0a
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.2.5-9
7f5b0a
- Renamed the source package to mingw-zlib (#800415)
7f5b0a
- Use mingw macros without leading underscore
7f5b0a
7f5b0a
* Mon Feb 27 2012 Kalev Lember <kalevlember@gmail.com> - 1.2.5-8
7f5b0a
- Remove the .la files
7f5b0a
- Spec clean up
7f5b0a
7f5b0a
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-7
7f5b0a
- Rebuild against the mingw-w64 toolchain
7f5b0a
- Use the correct RPM macros
7f5b0a
- Fix FTBFS against the latest binutils caused by the use of an invalid .def file
7f5b0a
7f5b0a
* Fri Feb 17 2012 David Tardon <dtardon@redhat.com> - 1.2.5-6
7f5b0a
- fix dlname in libz.la
7f5b0a
7f5b0a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-5
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7f5b0a
7f5b0a
* Tue May 10 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-4
7f5b0a
- Use the built .pc file instead of manually generating it
7f5b0a
7f5b0a
* Tue Apr 26 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-3
7f5b0a
- Install zlib pkgconfig file
7f5b0a
7f5b0a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-2
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7f5b0a
7f5b0a
* Sun Sep 12 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-1
7f5b0a
- Update to 1.2.5
7f5b0a
- Use %%global instead of %%define
7f5b0a
- Automatically generate debuginfo subpackage
7f5b0a
- Use correct %%defattr tag
7f5b0a
- Merged the changes from the native Fedora package
7f5b0a
7f5b0a
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-19
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7f5b0a
7f5b0a
* Fri Jun 12 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-18
7f5b0a
- Cannot copy current directory into itself, so fix the copy command
7f5b0a
  which creates 'x' subdirectory.
7f5b0a
7f5b0a
* Fri May  1 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 1.2.3-17
7f5b0a
- BR autoconf, automake, libtool
7f5b0a
7f5b0a
* Thu Apr 30 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 1.2.3-16
7f5b0a
- use autotools build system from native package
7f5b0a
7f5b0a
* Tue Mar  3 2009 W. Pilorz <wpilorz at gmail.com> - 1.2.3-15
7f5b0a
- Add static subpackage.
7f5b0a
7f5b0a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-14
7f5b0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7f5b0a
7f5b0a
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-13
7f5b0a
- Rebuild for mingw32-gcc 4.4
7f5b0a
7f5b0a
* Mon Jan 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-12
7f5b0a
- Force rebuild to test maintenance account.
7f5b0a
7f5b0a
* Thu Dec 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-11
7f5b0a
- Pass correct CFLAGS to build.
7f5b0a
7f5b0a
* Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
7f5b0a
- Consider native patches.
7f5b0a
7f5b0a
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
7f5b0a
- Rename mingw -> mingw32.
7f5b0a
7f5b0a
* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
7f5b0a
- Remove manpage.
7f5b0a
7f5b0a
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
7f5b0a
- Remove static library.
7f5b0a
7f5b0a
* Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
7f5b0a
- Fix misnamed file: zlibdll.a -> zlib.dll.a
7f5b0a
- Explicitly provide mingw(zlib1.dll).
7f5b0a
7f5b0a
* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
7f5b0a
- Initial RPM release, largely based on earlier work from several sources.