945b6d9
%?mingw_package_header
945b6d9
096f2b0
Name:           mingw-zlib
5c61afb
Version:        1.2.8
db0d19c
Release:        5%{?dist}
65ca41c
Summary:        MinGW Windows zlib compression library
65ca41c
65ca41c
License:        zlib
65ca41c
Group:          Development/Libraries
65ca41c
URL:            http://www.zlib.net/
65ca41c
Source0:        http://www.zlib.net/zlib-%{version}.tar.gz
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
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
2a1975b
BuildRequires:  perl
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.
862e270
Group:          Development/Libraries
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
2a1975b
%package -n mingw32-minizip
89656eb
Summary:        Minizip manipulates files from a .zip archive
2a1975b
Group:          Development/Libraries
89656eb
Requires:       mingw32-zlib = %{version}-%{release}
2a1975b
2a1975b
%description -n  mingw32-minizip
2a1975b
MinGW Minizip manipulates files from a .zip archive.
2a1975b
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
%package -n mingw64-minizip
945b6d9
Summary:        Minizip manipulates files from a .zip archive
945b6d9
Requires:       mingw64-zlib = %{version}-%{release}
945b6d9
945b6d9
%description -n mingw64-minizip
945b6d9
MinGW Minizip manipulates files from a .zip archive.
945b6d9
65ca41c
945b6d9
%?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
945b6d9
%mingw_make %{?_smp_mflags}
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
945b6d9
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
945b6d9
945b6d9
# Manually install the correct zlib.dll
945b6d9
install -m 0644 build_win32/.libs/zlib1.dll $RPM_BUILD_ROOT%{mingw32_bindir}/
945b6d9
install -m 0644 build_win64/.libs/zlib1.dll $RPM_BUILD_ROOT%{mingw64_bindir}/
945b6d9
945b6d9
# Install the pkgconfig file
945b6d9
install -m 0644 build_win32/zlib.pc $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/
945b6d9
install -m 0644 build_win64/zlib.pc $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/
945b6d9
945b6d9
# Drop the fake libz-1.dll
945b6d9
rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/libz-1.dll
945b6d9
rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/libz-1.dll
65ca41c
945b6d9
# Drop all .la files
945b6d9
find $RPM_BUILD_ROOT -name "*.la" -delete
65ca41c
945b6d9
# Drop the man pages
945b6d9
rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
945b6d9
rm -rf $RPM_BUILD_ROOT%{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
2a1975b
%files -n mingw32-minizip
912d1bd
%{mingw32_libdir}/libminizip.dll.a
912d1bd
%{mingw32_bindir}/libminizip-1.dll
912d1bd
%dir %{mingw32_includedir}/minizip
912d1bd
%{mingw32_includedir}/minizip/*.h
912d1bd
%{mingw32_libdir}/pkgconfig/minizip.pc
2a1975b
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
945b6d9
%files -n mingw64-minizip
945b6d9
%{mingw64_libdir}/libminizip.dll.a
945b6d9
%{mingw64_bindir}/libminizip-1.dll
945b6d9
%dir %{mingw64_includedir}/minizip
945b6d9
%{mingw64_includedir}/minizip/*.h
945b6d9
%{mingw64_libdir}/pkgconfig/minizip.pc
945b6d9
2a1975b
65ca41c
%changelog
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.