]> git.pld-linux.org Git - packages/crossmingw32-zlib.git/blobdiff - crossmingw32-zlib.spec
- updated to 1.3.1
[packages/crossmingw32-zlib.git] / crossmingw32-zlib.spec
index e18ca6ba841ba68d0f776960577fa7ecdfc3ceb3..2dae197f02856d247a930d7b58444759c22efb59 100644 (file)
@@ -1,40 +1,54 @@
 #
 # Conditional build:
-%bcond_without asmopt  # without assmbler optimization for i586+
+%bcond_with    asmopt  # without assembler optimization for i686+
+                       # (asm is unsupported by upstream and unmaintained)
 #
-%ifnarch i586 i686 athlon
+# disable asmopt where not applicable
+%ifarch i386 i486 i586
+%undefine      with_asmopt
+%endif
+%ifnarch %{ix86}
 %undefine      with_asmopt
 %endif
 %define                realname                zlib
-Summary:       Library for compression and decompression - Ming32 cross version
-Summary(de):   Library für die Komprimierung und Dekomprimierung
-Summary(es):   Biblioteca para compresión y descompresión
-Summary(fr):   bibliothèque de compression et décompression
-Summary(pl):   Biblioteka z podprogramami do kompresji i dekompresji - wersja skro¶na dla Ming32
-Summary(pt_BR):        Biblioteca para compressão e descompressão
-Summary(ru):   âÉÂÌÉÏÔÅËÁ ÄÌÑ ËÏÍÐÒÅÓÓÉÉ É ÄÅËÏÍÐÒÅÓÓÉÉ
-Summary(tr):   Sýkýþtýrma iþlemleri için kitaplýk
-Summary(uk):   â¦Â̦ÏÔÅËÁ ÄÌÑ ËÏÍÐÒÅÓ¦§ ÔÁ ÄÅËÏÍÐÒÅÓ¦§
+Summary:       Library for compression and decompression - MinGW32 cross version
+Summary(pl.UTF-8):     Biblioteka z podprogramami do kompresji i dekompresji - wersja skrośna dla MinGW32
 Name:          crossmingw32-%{realname}
-Version:       1.2.1
+Version:       1.3.1
 Release:       1
 License:       BSD
-Group:         Libraries
-Source0:       http://www.gzip.org/zlib/%{realname}-%{version}.tar.gz
-# Source0-md5: ef1cb003448b4a53517b8f25adb12452
-Patch0:                %{realname}-asmopt.patch
-URL:           http://www.zlib.org/
+Group:         Development/Libraries
+Source0:       https://www.zlib.net/%{realname}-%{version}.tar.gz
+# Source0-md5: 9855b6d802d7fe5b7bd5b196a2271655
+URL:           https://www.zlib.net/
 BuildRequires: crossmingw32-gcc
+BuildRequires: sed >= 4.0
 Requires:      crossmingw32-runtime
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                no_install_post_strip   1
+%define                _enable_debug_packages  0
 
 %define                target                  i386-mingw32
-%define                arch                    %{_prefix}/%{target}
+%define                target_platform         i386-pc-mingw32
 
+%define                _sysprefix              /usr
+%define                _prefix                 %{_sysprefix}/%{target}
+%define                _libdir                 %{_prefix}/lib
+%define                _pkgconfigdir           %{_prefix}/lib/pkgconfig
+%define                _dlldir                 /usr/share/wine/windows/system
 %define                __cc                    %{target}-gcc
 %define                __cxx                   %{target}-g++
+%define                __pkgconfig_provides    %{nil}
+%define                __pkgconfig_requires    %{nil}
+
+%ifarch alpha sparc sparc64 sparcv9
+%define                optflags        -O2
+%endif
+
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define                filterout_ld    -Wl,-z,.*
+%define                filterout_c             -f[-a-z0-9=]*
 
 %description
 The 'zlib' compression library provides in-memory compression and
@@ -43,114 +57,138 @@ uncompressed data. This version of the library supports only one
 compression method (deflation) but other algorithms may be added later
 and will have the same stream interface.
 
-%description -l de
-Die zlib-Komprimierungs-Library bietet speicherinterne Komprimierungs-
-und Dekomprimierungsfunktionen, einschließlich Integritätsprüfungen
-der unkomprimierten Daten. Diese Version der Library unterstützt nur
-eine Komprimierungsmethode (Deflation), doch können weitere
-Algorithmen nachträglich eingefügt werden und haben dann dieselbe
-Oberfläche.
-
-%description -l es
-La biblioteca de compresión 'zlib' nos ofrece funciones de compresión
-y descompresión en memoria, incluyendo chequeo de la integridad de
-datos no comprimidos. Esta versión de la biblioteca soporta solamente
-un método de compresión (deflación) pero otros algoritmos pueden ser
-añadidos más tarde y tendrán la misma interface. Esta biblioteca se
-usa por varios programas de sistema.
-
-%description -l fr
-La bibliothèque de compression « zlib » offre des fonctions de
-compression et de décompression en mémoire, ainsi qu'une vérification
-de l'intégrité des données décompressées. La version de cette
-bibliothèque ne gère qu'une méthode de compression (deflation), mais
-d'autres algorithmes peuvent être ajoutés plus tard et auront la même
-interface.
-
-%description -l pl
-Biblioteka zlib udostêpnia podprogramy do kompresji i dekompresji w
-pamiêci operacyjnej w³±cznie ze sprawdzaniem integralno¶ci w trakcie
-dekompresji. Ta wersja biblioteki udostêpnia tylko jedn± metodê
-kompresji o nazwie deflation niemniej inne algorytmy mog± byæ
-dodawane udostêpniaj±c taki sam interfejs funkcji operuj±cych na
+This package contains the cross version for Win32.
+
+%description -l pl.UTF-8
+Biblioteka zlib udostępnia podprogramy do kompresji i dekompresji w
+pamięci operacyjnej włącznie ze sprawdzaniem integralności w trakcie
+dekompresji. Ta wersja biblioteki udostępnia tylko jedną metodę
+kompresji o nazwie deflation niemniej inne algorytmy mogą być
+dodawane udostępniając taki sam interfejs funkcji operujących na
 strumieniu danych.
 
-%description -l pt_BR
-A biblioteca de compressão 'zlib' oferece funções de compressão e
-descompressão em memória, incluindo checagem da integridade de dados
-não comprimidos. Essa versão da biblioteca suporta somente um método
-de compressão (deflação) mas outros algoritmos podem ser adicionados
-mais tarde e terão a mesma interface. Essa biblioteca é usada por
-vários programas de sistema.
-
-%description -l ru
-âÉÂÌÉÏÔÅËÁ ËÏÍÐÒÅÓÓÉÉ zlib ÓÏÄÅÒÖÉÔ ÆÕÎËÃÉÉ ËÏÍÐÒÅÓÓÉÉ É ÄÅËÏÍÐÒÅÓÓÉÉ
-× ÐÁÍÑÔÉ, ×ËÌÀÞÁÀ ÐÒÏ×ÅÒËÕ ÃÅÌÏÓÔÎÏÓÔÉ ÄÅËÏÍÐÒÅÓÓÉÒÏ×ÁÎÎÙÈ ÄÁÎÎÙÈ. üÔÁ
-×ÅÒÓÉÑ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÔÏÌØËÏ ÏÄÉΠÍÅÔÏÄ ËÏÍÐÒÅÓÓÉÉ (deflation), ÎÏ
-×ÐÏÓÌÅÄÓÔ×ÉÉ × ÎÅÅ ÍÏÇÕÔ ÂÙÔØ ÄÏÂÁ×ÌÅÎÙ É ÄÒÕÇÉÅ ÍÅÔÏÄÙ, É ×ÓÅ ÏÎÉ
-ÂÕÄÕÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÔ ÖÅ ÐÏÔÏËÏ×ÙÊ ÉÎÔÅÒÆÅÊÓ.
-
-%description -l tr
-zlib sýkýþtýrma kitaplýðý bellekte sýkýþtýrma ve açma fonksiyonlarý
-içermektedir. Bu sürüm yalnýzca 'deflation' yöntemini
-desteklemektedir. Ancak baþka algoritmalarýn ayný arabirimle
-eriþilebilecek þekilde eklenme olasýlýðý vardýr. Bu kitaplýk bir dizi
-sistem yazýlýmý tarafýndan kullanýlmaktadýr.
-
-%description -l uk
-â¦Â̦ÏÔÅËÁ ËÏÍÐÒÅÓ¦§ zlib Í¦ÓÔÉÔØ ÆÕÎË槠ËÏÍÐÒÅÓ¦§ ÔÁ ÄÅËÏÍÐÒÅÓ¦§ ×
-ÐÁÍ'ÑÔ¦ Ú ÐÅÒÅצÒËÏÀ Ã¦ÌÏÓÔ¦ ÄÅËÏÍÐÒÅÓÏ×ÁÎÉÈ ÄÁÎÉÈ. ãÑ ×ÅÒÓ¦Ñ
-ЦÄÔÒÉÍÕ¤ Ô¦ÌØËÉ ÏÄÉΠÍÅÔÏÄ ËÏÍÐÒÅÓ¦§ (deflation), ÁÌÅ × ÍÁÊÂÕÔÎØÏÍÕ ×
-Îŧ ÍÏÖÕÔØ ÂÕÔÉ ÄÏÄÁΦ ¦ ¦ÎÛ¦ ÍÅÔÏÄÉ ¦ ×Ó¦ ×ÏÎÉ ÂÕÄÕÔØ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ
-ÔÏÊ ÖÅ ÓÁÍÉÊ ÐÏÔÏËÏ×ÉÊ ¦ÎÔÅÒÆÅÊÓ.
+Ten pakiet zawiera wersję skrośną dla Win32.
+
+%package static
+Summary:       Static zlib library (cross MinGW32 version)
+Summary(pl.UTF-8):     Statyczna biblioteka zlib (wersja skrośna MinGW32)
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description static
+Static zlib library (cross MinGW32 version).
+
+%description static -l pl.UTF-8
+Statyczna biblioteka zlib (wersja skrośna MinGW32).
+
+%package dll
+Summary:       zlib - DLL library for Windows
+Summary(pl.UTF-8):     zlib - biblioteka DLL dla Windows
+Group:         Applications/Emulators
+Requires:      wine
+
+%description dll
+zlib - DLL library for Windows.
+
+%description dll -l pl.UTF-8
+zlib - biblioteka DLL dla Windows.
 
 %prep
 %setup -q -n %{realname}-%{version}
 
 %if %{with asmopt}
-%patch0 -p1
 %ifarch i686 athlon
 cp contrib/asm686/match.S .
 %endif
-%ifarch i586
-cp contrib/asm586/match.S .
-%endif
 %endif
 
-# fix for underline test
-#sed -e 's/nm/%{target}-nm/' configure > configure.tmp
-# but it's broken anyway (tries to use mmap test remains, but there is no mmap
-# in mingw32) - so hardcode that underline is needed
-sed -e 's/.*grep _hello.*/if false; then/' configure > configure.tmp
-mv -f configure.tmp configure
-chmod +x configure
-
 %build
-CC="%{__cc}" \
-CXX="%{__cxx}" \
-AR="%{target}-ar rc" \
-RANLIB="%{target}-ranlib" \
-CFLAGS="-D_REENTRANT %{rpmcflags}%{?with_asmopt: -DASMV}" \
-./configure \
-       --prefix=%{arch}
-
-%{__make}
+%{__make} -fwin32/Makefile.gcc all \
+       CC="%{__cc}" \
+       CXX="%{__cxx}" \
+       AR="%{target}-ar" \
+       RANLIB="%{target}-ranlib" \
+       CFLAGS="-D_REENTRANT -D_LARGEFILE64_SOURCE=1 %{rpmcflags}%{?with_asmopt: -DASMV}" \
+       DLLWRAP="%{target}-dllwrap" \
+       RC="%{target}-windres" \
+       CP="install" \
+       IMPLIB="libz.dll.a" \
+       prefix="%{_prefix}" \
+       %{?with_asmopt:OBJA=match.o}
+
+# used by libtool to detect dependencies
+cat << "EOF" >> libz.la
+# libz.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+# ^^^^ This line needs to stay
+# Made by czarny czarny at pld-linux.org
+
+# The name that we can dlopen(3).
+dlname='%{_dlldir}/zlib1.dll'
+
+# Names of this library.
+library_names='libz.dll.a'
+
+# The name of the static archive.
+old_library='libz.a'
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Version information for libz.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='%{_libdir}'
+EOF
+
+sed -e 's=@prefix@=%{_prefix}=;s=@exec_prefix@=%{_prefix}=;s=@\(shared\)\?libdir@=%{_libdir}=;s=@includedir@=%{_includedir}=;s=@VERSION@=%{version}=' \
+       < zlib.pc.in > zlib.pc
+
+%if 0%{!?debug:1}
+%{target}-strip -R.comment -R.note zlib1.dll
+%{target}-strip -g -R.comment -R.note *.a
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{arch}{/lib,/include}
-
-%{__make} install \
-       prefix=$RPM_BUILD_ROOT%{arch}
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir},%{_pkgconfigdir}}
 
-install zutil.h $RPM_BUILD_ROOT%{arch}/include
-
-%{!?debug:%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{arch}/lib/libz.a}
+install zlib.h $RPM_BUILD_ROOT%{_includedir}
+install zconf.h $RPM_BUILD_ROOT%{_includedir}
+install libz.dll.a $RPM_BUILD_ROOT%{_libdir}
+install libz.a $RPM_BUILD_ROOT%{_libdir}
+install libz.la $RPM_BUILD_ROOT%{_libdir}
+install zlib1.dll $RPM_BUILD_ROOT%{_dlldir}
+install zlib.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%{arch}/include/*.h
-%{arch}/lib/libz.a
+%{_libdir}/libz.dll.a
+%{_libdir}/libz.la
+%{_includedir}/zconf.h
+%{_includedir}/zlib.h
+%{_pkgconfigdir}/zlib.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libz.a
+
+%files dll
+%defattr(644,root,root,755)
+%{_dlldir}/zlib1.dll
This page took 0.093327 seconds and 4 git commands to generate.