Initial import.

This commit is contained in:
Richard W.M. Jones 2008-12-21 11:13:21 +00:00
parent 03c0f7008a
commit 65ca41cfca
5 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1 @@
zlib-1.2.3.tar.gz

1
import.log Normal file
View File

@ -0,0 +1 @@
mingw32-zlib-1_2_3-11_fc10:HEAD:mingw32-zlib-1.2.3-11.fc10.src.rpm:1229857609

112
mingw32-zlib.spec Normal file
View File

@ -0,0 +1,112 @@
%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
Name: mingw32-zlib
Version: 1.2.3
Release: 11%{?dist}
Summary: MinGW Windows zlib compression library
License: zlib
Group: Development/Libraries
URL: http://www.zlib.net/
Source0: http://www.zlib.net/zlib-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# From Fedora native package, none is applicable to us.
#Patch3: zlib-1.2.3-autotools.patch
#Patch4: minizip-1.2.3-autotools.patch
#Patch5: zlib-1.2.3-minizip.patch
# MinGW-specific patches.
Patch100: zlib-win32.patch
BuildRequires: mingw32-filesystem >= 23
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
%description
MinGW Windows zlib compression library.
%prep
%setup -q -n zlib-1.2.3
%patch100 -p1
%build
CC=%{_mingw32_cc} \
CFLAGS="%{_mingw32_cflags}" \
RANLIB=%{_mingw32_ranlib} \
./configure
make -f win32/Makefile.gcc \
CFLAGS="%{_mingw32_cflags}" \
CC=%{_mingw32_cc} \
AR=%{_mingw32_ar} \
RC=i686-pc-mingw32-windres \
DLLWRAP=i686-pc-mingw32-dllwrap \
STRIP=%{_mingw32_strip} \
all
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
make -f win32/Makefile.gcc \
INCLUDE_PATH=$RPM_BUILD_ROOT%{_mingw32_includedir} \
LIBRARY_PATH=$RPM_BUILD_ROOT%{_mingw32_libdir} \
BINARY_PATH=$RPM_BUILD_ROOT%{_mingw32_bindir} \
install
# .dll.a file is misnamed for some reason - fix that.
mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libzdll.a \
$RPM_BUILD_ROOT%{_mingw32_libdir}/libz.dll.a
# Remove static library.
rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libz.a
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_mingw32_includedir}/zconf.h
%{_mingw32_includedir}/zlib.h
%{_mingw32_libdir}/libz.dll.a
%{_mingw32_bindir}/zlib1.dll
%changelog
* Thu Dec 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-11
- Pass correct CFLAGS to build.
* Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-10
- Consider native patches.
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-9
- Rename mingw -> mingw32.
* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-8
- Remove manpage.
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-7
- Remove static library.
* Fri Sep 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-5
- Fix misnamed file: zlibdll.a -> zlib.dll.a
- Explicitly provide mingw(zlib1.dll).
* Thu Sep 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-3
- Initial RPM release, largely based on earlier work from several sources.

View File

@ -0,0 +1 @@
debc62758716a169df9f62e6ab2bc634 zlib-1.2.3.tar.gz

41
zlib-win32.patch Normal file
View File

@ -0,0 +1,41 @@
diff -rup zlib-1.2.3.orig/win32/Makefile.gcc zlib-1.2.3.new/win32/Makefile.gcc
--- zlib-1.2.3.orig/win32/Makefile.gcc 2003-08-01 23:49:00.000000000 -0400
+++ zlib-1.2.3.new/win32/Makefile.gcc 2008-09-02 08:24:44.000000000 -0400
@@ -45,6 +45,9 @@ ARFLAGS = rcs
RC = windres
RCFLAGS = --define GCC_WINDRES
+DLLWARP = dllwrap
+STRIP = strip
+
CP = cp -fp
# If GNU install is available, replace $(CP) with install.
INSTALL = $(CP)
@@ -79,9 +82,9 @@ $(STATICLIB): $(OBJS) $(OBJA)
$(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
- dllwrap --driver-name $(CC) --def win32/zlib.def \
+ $(DLLWRAP) --driver-name $(CC) --def win32/zlib.def \
--implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
- strip $@
+ $(STRIP) $@
example: example.o $(STATICLIB)
$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
@@ -104,12 +107,13 @@ zlibrc.o: win32/zlib1.rc
.PHONY: install uninstall clean
install: zlib.h zconf.h $(LIB)
- -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
- -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
+ -mkdir -p $(INCLUDE_PATH)
+ -mkdir -p $(LIBRARY_PATH)
-$(INSTALL) zlib.h $(INCLUDE_PATH)
-$(INSTALL) zconf.h $(INCLUDE_PATH)
-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
+ -$(INSTALL) $(SHAREDLIB) $(BINARY_PATH)
uninstall:
-$(RM) $(INCLUDE_PATH)/zlib.h