- Remove zlib-devel-static, nothing should use libz.a anyway.
- Package minizip library, everything using it should now pull minizip-devel and unbundle it OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=25
This commit is contained in:
parent
5b7bbe7563
commit
9c39bd5f66
@ -3,4 +3,3 @@ libz1
|
|||||||
provides "zlib-<targettype> = <version>"
|
provides "zlib-<targettype> = <version>"
|
||||||
obsoletes "zlib-<targettype> <= 1.2.8"
|
obsoletes "zlib-<targettype> <= 1.2.8"
|
||||||
zlib-devel
|
zlib-devel
|
||||||
zlib-devel-static
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 24 09:01:59 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Remove zlib-devel-static, nothing should use libz.a anyway.
|
||||||
|
- Package minizip library, everything using it should now pull
|
||||||
|
minizip-devel and unbundle it
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 25 08:04:55 UTC 2014 - tchvatal@suse.com
|
Thu Sep 25 08:04:55 UTC 2014 - tchvatal@suse.com
|
||||||
|
|
||||||
|
84
zlib.spec
84
zlib.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package zlib
|
# spec file for package zlib
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -32,12 +32,11 @@ Source3: zlib-rpmlintrc
|
|||||||
Patch0: zlib-1.2.7-improve-longest_match-performance.patch
|
Patch0: zlib-1.2.7-improve-longest_match-performance.patch
|
||||||
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf
|
||||||
Patch1: zlib-format.patch
|
Patch1: zlib-format.patch
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
# bug437293
|
|
||||||
%ifarch ppc64
|
|
||||||
Obsoletes: zlib-64bit
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
zlib is designed to be a free, general-purpose, legally unencumbered -- that
|
zlib is designed to be a free, general-purpose, legally unencumbered -- that
|
||||||
@ -51,7 +50,7 @@ input data and can be reduced, if necessary, at some cost in compression.
|
|||||||
|
|
||||||
%package -n libz1
|
%package -n libz1
|
||||||
Summary: Include Files and Libraries mandatory for Development
|
Summary: Include Files and Libraries mandatory for Development
|
||||||
Group: Development/Languages/C and C++
|
Group: System/Libraries
|
||||||
Provides: %{name} = %{version}-%{release}
|
Provides: %{name} = %{version}-%{release}
|
||||||
Obsoletes: %{name} < %{version}-%{release}
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
|
||||||
@ -70,28 +69,29 @@ Summary: Include Files and Libraries mandatory for Development
|
|||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
Requires: glibc-devel
|
Requires: glibc-devel
|
||||||
Requires: libz1 = %{version}
|
Requires: libz1 = %{version}
|
||||||
Provides: libz:%{_includedir}/zlib.h
|
|
||||||
# bug437293
|
|
||||||
%ifarch ppc64
|
|
||||||
Obsoletes: zlib-devel-64bit
|
|
||||||
%endif
|
|
||||||
#
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains all necessary include files and libraries needed
|
This package contains all necessary include files and libraries needed
|
||||||
to develop applications that require the provided includes and
|
to develop applications that require the provided includes and
|
||||||
libraries.
|
libraries.
|
||||||
|
|
||||||
%package devel-static
|
%package -n libminizip1
|
||||||
Summary: Include Files and Libraries mandatory for Development
|
Summary: Library for manipulation with .zip archives
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n libminizip1
|
||||||
|
Minizip is a library for manipulation with files from .zip archives.
|
||||||
|
|
||||||
|
%package -n minizip-devel
|
||||||
|
Summary: Development files for the minizip library
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
Requires: %{name}-devel = %{version}
|
Requires: %{name}-devel = %{version}
|
||||||
Provides: %{name}-devel:%{_libdir}/libz.a
|
Requires: libminizip1 = %{version}
|
||||||
|
Requires: pkgconfig
|
||||||
|
|
||||||
%description devel-static
|
%description -n minizip-devel
|
||||||
This package contains all necessary include files and libraries needed
|
This package contains the libraries and header files needed for
|
||||||
to develop applications that require the provided includes and
|
developing applications which use minizip.
|
||||||
libraries.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -101,31 +101,44 @@ libraries.
|
|||||||
%build
|
%build
|
||||||
export LDFLAGS="-Wl,-z,relro,-z,now"
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||||
|
|
||||||
|
export CFLAGS="%{optflags}"
|
||||||
|
# For sure not autotools build
|
||||||
|
CC="cc" ./configure \
|
||||||
|
--shared \
|
||||||
|
--prefix=%{_prefix} \
|
||||||
|
--libdir=/%{_lib}
|
||||||
|
|
||||||
# Marcus: breaks example64 in 32bit builds, so it's disabled by default
|
# Marcus: breaks example64 in 32bit builds, so it's disabled by default
|
||||||
%if %{with profiling}
|
%if %{with profiling}
|
||||||
profiledir=$(mktemp -d)
|
profiledir=$(mktemp -d)
|
||||||
trap "rm -rf $profiledir" EXIT
|
trap "rm -rf $profiledir" EXIT
|
||||||
CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
|
|
||||||
make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
|
make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags}
|
||||||
time make check %{?_smp_mflags}
|
time make check %{?_smp_mflags}
|
||||||
make clean
|
make %{?_smp_mflags} clean
|
||||||
make CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags}
|
make CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags}
|
||||||
%else
|
%else
|
||||||
export CFLAGS="%{optflags}"
|
|
||||||
CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# And build minizip
|
||||||
|
cd contrib/minizip
|
||||||
|
autoreconf -fvi
|
||||||
|
%configure \
|
||||||
|
--disable-static \
|
||||||
|
--disable-silent-rules
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
time make check %{?_smp_mflags}
|
time make check %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_libdir}
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
|
# Fix shared library placement/symlinks
|
||||||
ln -s -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
|
ln -s -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
|
||||||
rm -v %{buildroot}/%{_lib}/libz.so
|
rm -v %{buildroot}/%{_lib}/libz.so
|
||||||
# static lib
|
# Kill static library
|
||||||
mv %{buildroot}/%{_lib}/libz.a %{buildroot}%{_libdir}
|
rm -f %{buildroot}/%{_lib}/libz.a
|
||||||
# Move .pc file to _libdir
|
# Move .pc file to _libdir
|
||||||
mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
|
mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
|
||||||
# manpage
|
# manpage
|
||||||
@ -135,10 +148,19 @@ install -m 644 zutil.h %{buildroot}%{_includedir}
|
|||||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
cp -r examples/ %{buildroot}%{_docdir}/%{name}/
|
cp -r examples/ %{buildroot}%{_docdir}/%{name}/
|
||||||
|
|
||||||
|
# Install minizip
|
||||||
|
cd contrib/minizip
|
||||||
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
%post -n libz1 -p /sbin/ldconfig
|
%post -n libz1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n libz1 -p /sbin/ldconfig
|
%postun -n libz1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libminizip1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libminizip1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n libz1
|
%files -n libz1
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/%{_lib}/libz.so.1.2.*
|
/%{_lib}/libz.so.1.2.*
|
||||||
@ -157,8 +179,16 @@ cp -r examples/ %{buildroot}%{_docdir}/%{name}/
|
|||||||
%{_libdir}/libz.so
|
%{_libdir}/libz.so
|
||||||
%{_libdir}/pkgconfig/zlib.pc
|
%{_libdir}/pkgconfig/zlib.pc
|
||||||
|
|
||||||
%files devel-static
|
%files -n libminizip1
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libz.a
|
%doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt
|
||||||
|
%{_libdir}/libminizip.so.*
|
||||||
|
|
||||||
|
%files -n minizip-devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_includedir}/minizip
|
||||||
|
%{_includedir}/minizip/*.h
|
||||||
|
%{_libdir}/libminizip.so
|
||||||
|
%{_libdir}/pkgconfig/minizip.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user