summaryrefslogtreecommitdiffstats
path: root/cygwin-zlib.spec
diff options
context:
space:
mode:
Diffstat (limited to 'cygwin-zlib.spec')
-rw-r--r--cygwin-zlib.spec61
1 files changed, 50 insertions, 11 deletions
diff --git a/cygwin-zlib.spec b/cygwin-zlib.spec
index f8412dd..d24cbad 100644
--- a/cygwin-zlib.spec
+++ b/cygwin-zlib.spec
@@ -6,19 +6,19 @@
%define __debug_install_post %{_cygwin_debug_install_post}
Name: cygwin-zlib
-Version: 1.2.5
-Release: 2
+Version: 1.2.7
+Release: 1
Summary: Cygwin zlib compression library
License: zlib
Group: Development/Libraries
URL: http://www.zlib.net/
-Source0: http://www.zlib.net/zlib-%{version}.tar.gz
-# https://bugzilla.redhat.com/show_bug.cgi?id=591317
-Patch0: zlib-1.2.5-gentoo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+Source0: http://www.zlib.net/zlib-%{version}.tar.gz
+Patch0: zlib-1.2.7-minizip-cygwin.patch
+
BuildRequires: cygwin-filesystem
BuildRequires: cygwin-gcc
BuildRequires: cygwin-binutils
@@ -35,14 +35,27 @@ Requires: cygwin-zlib = %{version}-%{release}
%description static
The cygwin-zlib-static package contains static library for cygwin-zlib development.
+%package -n cygwin-minizip
+Summary: Minizip library for Cygwin toolchain
+Group: Development/Libraries
+BuildRequires: cygwin-bzip2
+Requires: cygwin-zlib = %{version}-%{release}
+
+%description -n cygwin-minizip
+Minizip library for the Cygwin cross-compiler toolchain.
+
%{_cygwin_debug_package}
%prep
%setup -q -n zlib-%{version}
-%patch0 -p1 -b .gentoo
+%patch0 -p2
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
+sed -i -e '/gzopen_w/d' win32/zlib.def
+pushd contrib/minizip
+%{_cygwin_autoreconf}
+popd
%build
CC=%{_cygwin_cc} \
@@ -58,19 +71,35 @@ make -f win32/Makefile.gcc \
IMPLIB=libz.dll.a \
all
+pushd contrib/minizip
+%{_cygwin_configure} --disable-static \
+ CPPFLAGS=-DHAVE_BZIP2 \
+ LIBS=-lbz2
+make %{?_smp_flags}
+popd
+
%install
rm -rf $RPM_BUILD_ROOT
make -f win32/Makefile.gcc \
- BINARY_PATH=$RPM_BUILD_ROOT/%{_cygwin_bindir} \
- INCLUDE_PATH=$RPM_BUILD_ROOT/%{_cygwin_includedir} \
- LIBRARY_PATH=$RPM_BUILD_ROOT/%{_cygwin_libdir} \
+ DESTDIR=$RPM_BUILD_ROOT \
+ BINARY_PATH=%{_cygwin_bindir} \
+ INCLUDE_PATH=%{_cygwin_includedir} \
+ LIBRARY_PATH=%{_cygwin_libdir} \
SHARED_MODE=1 \
SHAREDLIB=cygz.dll \
IMPLIB=libz.dll.a \
install
+pushd contrib/minizip
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_cygwin_libdir}/*.la
+
+# Remove the documentation and manpages which duplicate Fedora native
rm -rf $RPM_BUILD_ROOT/%{_cygwin_mandir}
@@ -80,18 +109,28 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
+%{_cygwin_bindir}/cygz.dll
%{_cygwin_includedir}/zconf.h
%{_cygwin_includedir}/zlib.h
%{_cygwin_libdir}/libz.dll.a
-%{_cygwin_bindir}/cygz.dll
-
+%{_cygwin_libdir}/pkgconfig/zlib.pc
%files static
%defattr(-,root,root,-)
%{_cygwin_libdir}/libz.a
+%files -n cygwin-minizip
+%{_cygwin_bindir}/cygminizip-1.dll
+%{_cygwin_includedir}/minizip/
+%{_cygwin_libdir}/libminizip.dll.a
+%{_cygwin_libdir}/pkgconfig/minizip.pc
+
%changelog
+* Wed May 23 2012 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.2.7-1
+- Version bump.
+- Added minizip subpackage.
+
* Thu Feb 17 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.2.5-2
- Added debuginfo package.