94f4017
%{?mingw_package_header}
945b6d9
096f2b0
Name:           mingw-zlib
7335e33
Version:        1.2.11
890f281
Release:        5%{?dist}
65ca41c
Summary:        MinGW Windows zlib compression library
65ca41c
65ca41c
License:        zlib
65ca41c
URL:            http://www.zlib.net/
7335e33
Source0:        http://www.zlib.net/zlib-%{version}.tar.xz
89656eb
# Replace the zlib build system with an autotools based one
2333169
Patch3:         mingw32-zlib-1.2.7-autotools.patch
cc83bfe
# The .def file contains an empty LIBRARY line which isn't valid
2333169
Patch5:         zlib-1.2.7-use-correct-def-file.patch
945b6d9
# Libtool tries to make a libz-1.dll while we expect zlib1.dll
945b6d9
# Force this by hacking the ltmain.sh
945b6d9
Patch6:         mingw32-zlib-create-zlib1-dll.patch
cc83bfe
65ca41c
BuildArch:      noarch
65ca41c
adadf62
BuildRequires: make
945b6d9
BuildRequires:  mingw32-filesystem >= 95
65ca41c
BuildRequires:  mingw32-gcc
65ca41c
BuildRequires:  mingw32-binutils
945b6d9
945b6d9
BuildRequires:  mingw64-filesystem >= 95
945b6d9
BuildRequires:  mingw64-gcc
945b6d9
BuildRequires:  mingw64-binutils
945b6d9
67f80b4
BuildRequires:  perl-interpreter
0b1177f
BuildRequires:  autoconf
0b1177f
BuildRequires:  automake
0b1177f
BuildRequires:  libtool
65ca41c
65ca41c
65ca41c
%description
65ca41c
MinGW Windows zlib compression library.
65ca41c
096f2b0
945b6d9
# Win32
096f2b0
%package -n mingw32-zlib
945b6d9
Summary:        MinGW Windows zlib compression library for the win32 target
096f2b0
096f2b0
%description -n mingw32-zlib
945b6d9
MinGW Windows zlib compression library for the win32 target.
096f2b0
096f2b0
096f2b0
%package -n mingw32-zlib-static
89656eb
Summary:        Static libraries for mingw32-zlib development.
89656eb
Requires:       mingw32-zlib = %{version}-%{release}
862e270
096f2b0
%description -n mingw32-zlib-static
862e270
The mingw32-zlib-static package contains static library for mingw32-zlib development.
862e270
096f2b0
945b6d9
# Win64
945b6d9
%package -n mingw64-zlib
945b6d9
Summary:        MinGW Windows zlib compression library for the win64 target
945b6d9
945b6d9
%description -n mingw64-zlib
945b6d9
MinGW Windows zlib compression library for the win64 target.
945b6d9
945b6d9
%package -n mingw64-zlib-static
945b6d9
Summary:        Static libraries for mingw64-zlib development
945b6d9
Requires:       mingw64-zlib = %{version}-%{release}
945b6d9
945b6d9
%description -n mingw64-zlib-static
945b6d9
The mingw64-zlib-static package contains static library for mingw64-zlib development.
945b6d9
945b6d9
94f4017
%{?mingw_debug_package}
89656eb
89656eb
65ca41c
%prep
5c37515
%setup -q -n zlib-%{version}
2a1975b
%patch3 -p1 -b .atools
945b6d9
%patch5 -p1 -b .def
2a1975b
# patch cannot create an empty dir
2a1975b
mkdir m4
2a1975b
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
65ca41c
945b6d9
autoreconf --install --force
945b6d9
945b6d9
%patch6 -p0 -b .libtool
945b6d9
945b6d9
65ca41c
%build
945b6d9
%mingw_configure
94f4017
%mingw_make_build
65ca41c
65ca41c
65ca41c
%install
945b6d9
# Libtool tries to install a file called libz-1.dll
945b6d9
# but this isn't created anymore due to patch #6
945b6d9
# Fool libtool until a proper fix has been found
945b6d9
touch build_win32/.libs/libz-1.dll build_win64/.libs/libz-1.dll
94f4017
%mingw_make_install
945b6d9
945b6d9
# Manually install the correct zlib.dll
94f4017
install -m 0644 build_win32/.libs/zlib1.dll %{buildroot}%{mingw32_bindir}/
94f4017
install -m 0644 build_win64/.libs/zlib1.dll %{buildroot}%{mingw64_bindir}/
945b6d9
945b6d9
# Install the pkgconfig file
94f4017
install -Dm 0644 build_win32/zlib.pc %{buildroot}%{mingw32_libdir}/pkgconfig/zlib.pc
94f4017
install -Dm 0644 build_win64/zlib.pc %{buildroot}%{mingw64_libdir}/pkgconfig/zlib.pc
945b6d9
945b6d9
# Drop the fake libz-1.dll
94f4017
rm -f %{buildroot}%{mingw32_bindir}/libz-1.dll
94f4017
rm -f %{buildroot}%{mingw64_bindir}/libz-1.dll
65ca41c
945b6d9
# Drop all .la files
94f4017
find %{buildroot} -name "*.la" -delete
65ca41c
945b6d9
# Drop the man pages
94f4017
rm -rf %{buildroot}%{mingw32_mandir}
94f4017
rm -rf %{buildroot}%{mingw64_mandir}
65ca41c
65ca41c
945b6d9
# Win32
096f2b0
%files -n mingw32-zlib
912d1bd
%{mingw32_includedir}/zconf.h
912d1bd
%{mingw32_includedir}/zlib.h
912d1bd
%{mingw32_libdir}/libz.dll.a
912d1bd
%{mingw32_bindir}/zlib1.dll
912d1bd
%{mingw32_libdir}/pkgconfig/zlib.pc
65ca41c
096f2b0
%files -n mingw32-zlib-static
912d1bd
%{mingw32_libdir}/libz.a
862e270
945b6d9
# Win64
945b6d9
%files -n mingw64-zlib
945b6d9
%{mingw64_includedir}/zconf.h
945b6d9
%{mingw64_includedir}/zlib.h
945b6d9
%{mingw64_libdir}/libz.dll.a
945b6d9
%{mingw64_bindir}/zlib1.dll
945b6d9
%{mingw64_libdir}/pkgconfig/zlib.pc
945b6d9
945b6d9
%files -n mingw64-zlib-static
945b6d9
%{mingw64_libdir}/libz.a
945b6d9
2a1975b
65ca41c
%changelog
890f281
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-5
890f281
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
890f281
94f4017
* Thu Nov 12 2020 Sandro Mani <manisandro@gmail.com> - 1.2.11-4
94f4017
- Drop minizip subpackages, it's a separate package now
94f4017
e42cf43
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-3
e42cf43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e42cf43
c6bd60f
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.11-2
c6bd60f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c6bd60f
7335e33
* Tue Aug 13 2019 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.2.11-1
7335e33
- Update to 1.2.11
7335e33
726763b
* Tue Aug 06 2019 Thomas Sailer <t.sailer@alumni.ethz.ch> - 1.2.8-12
726763b
- update pkgconf file version to 1.2.8
726763b
73c76d7
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-11
73c76d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
73c76d7
22bd69c
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-10
22bd69c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
22bd69c
368a921
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-9
368a921
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
368a921
c7a5d7a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-8
c7a5d7a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c7a5d7a
de8d496
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-7
de8d496
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
de8d496
f4e6490
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-6
f4e6490
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f4e6490
db0d19c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-5
db0d19c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
db0d19c
6173ff6
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-4
6173ff6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6173ff6
8bd020f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-3
8bd020f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8bd020f
f089f18
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-2
f089f18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f089f18
5c61afb
* Sat Jul 13 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.8-1
5c61afb
- Update to 1.2.8
5c61afb
735f001
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-2
735f001
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
735f001
2333169
* Thu Nov 22 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.7-1
2333169
- Update to 1.2.7
2333169
2fdf393
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-11
2fdf393
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2fdf393
945b6d9
* Sat Mar 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-10
945b6d9
- Added win64 support
945b6d9
- Simplified the build process by using autotools and a hacked version of libtool
945b6d9
- Made the package compliant with the new MinGW packaging guidelines
945b6d9
096f2b0
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.2.5-9
096f2b0
- Renamed the source package to mingw-zlib (#800415)
912d1bd
- Use mingw macros without leading underscore
096f2b0
e959d46
* Mon Feb 27 2012 Kalev Lember <kalevlember@gmail.com> - 1.2.5-8
e959d46
- Remove the .la files
e959d46
- Spec clean up
e959d46
15be48b
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-7
15be48b
- Rebuild against the mingw-w64 toolchain
cc83bfe
- Use the correct RPM macros
cc83bfe
- Fix FTBFS against the latest binutils caused by the use of an invalid .def file
15be48b
2979771
* Fri Feb 17 2012 David Tardon <dtardon@redhat.com> - 1.2.5-6
2979771
- fix dlname in libz.la
2979771
82eb428
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-5
82eb428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
82eb428
Kalev Lember 3db3bea
* Tue May 10 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-4
Kalev Lember 3db3bea
- Use the built .pc file instead of manually generating it
Kalev Lember 3db3bea
Kalev Lember 3aba1ad
* Tue Apr 26 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-3
Kalev Lember 3aba1ad
- Install zlib pkgconfig file
Kalev Lember 3aba1ad
75bdf2e
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-2
75bdf2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
75bdf2e
89656eb
* Sun Sep 12 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.5-1
89656eb
- Update to 1.2.5
89656eb
- Use %%global instead of %%define
89656eb
- Automatically generate debuginfo subpackage
89656eb
- Use correct %%defattr tag
89656eb
- Merged the changes from the native Fedora package
89656eb
6d2b704
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-19
6d2b704
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6d2b704
5c37515
* Fri Jun 12 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-18
5c37515
- Cannot copy current directory into itself, so fix the copy command
5c37515
  which creates 'x' subdirectory.
5c37515
9d5be40
* Fri May  1 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 1.2.3-17
0b1177f
- BR autoconf, automake, libtool
0b1177f
2a1975b
* Thu Apr 30 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 1.2.3-16
2a1975b
- use autotools build system from native package
2a1975b
9d5be40
* Tue Mar  3 2009 W. Pilorz <wpilorz at gmail.com> - 1.2.3-15
862e270
- Add static subpackage.
862e270
5873e80
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-14
5873e80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5873e80
b6db801
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-13
b6db801
- Rebuild for mingw32-gcc 4.4
b6db801
2e91fb1
* Mon Jan 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-12
2e91fb1
- Force rebuild to test maintenance account.
2e91fb1
65ca41c
* Thu Dec 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-11
65ca41c
- Pass correct CFLAGS to build.
65ca41c
65ca41c
* Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
65ca41c
- Consider native patches.
65ca41c
65ca41c
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
65ca41c
- Rename mingw -> mingw32.
65ca41c
65ca41c
* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
65ca41c
- Remove manpage.
65ca41c
65ca41c
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
65ca41c
- Remove static library.
65ca41c
65ca41c
* Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
65ca41c
- Fix misnamed file: zlibdll.a -> zlib.dll.a
65ca41c
- Explicitly provide mingw(zlib1.dll).
65ca41c
65ca41c
* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
65ca41c
- Initial RPM release, largely based on earlier work from several sources.