zlib/zlib.spec
OBS User autobuild 520eea02a9 Accepting request 26384 from Archiving
Copy from Archiving/zlib based on submit request 26384 from user mseben

OBS-URL: https://build.opensuse.org/request/show/26384
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=14
2009-12-16 07:51:00 +00:00

153 lines
4.0 KiB
RPMSpec

#
# spec file for package zlib (Version 1.2.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: zlib
License: Zlib ; zlib license. See http://zlib.net/zlib_license.html
Group: System/Libraries
Provides: libz
Obsoletes: libz
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: zlib-64bit
%endif
#
Version: 1.2.3
Release: 141
Summary: Data Compression Library
Source: zlib-%{version}.tar.bz2
Source1: LICENSE
Source2: baselibs.conf
Patch: zlib-1.2.1-make-test.patch
Patch1: zlib-1.2.1-vsnprintf.patch
Patch2: zlib-1.2.1-CFLAGS.dif
Patch3: zlib-1.2.2-format.patch
Patch4: zlib-1.2.3-visibility-support.patch
#PATCH-FIX-UPSTREAM patch from Brian Raiter, update only license text of contrib file (#490107)
Patch5: zlib-1.2.3-686.patch
Url: http://www.zlib.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt
(deflate format) and rfc1952.txt (gzip format). These documents are
also available in other formats from
ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html.
Authors:
--------
Rob Hooft <hooft@EMBL-Heidelberg.DE>
Michael Mauldin <mlm@cs.cmu.edu>
%package devel
License: Other uncritical OpenSource License
Summary: Include Files and Libraries mandatory for Development
Group: Development/Languages/C and C++
Provides: libz:/usr/include/zlib.h
Requires: zlib = %{version} glibc-devel
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: zlib-devel-64bit
%endif
#
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require the provided includes and
libraries.
%package devel-static
License: Other uncritical OpenSource License
Summary: Include Files and Libraries mandatory for Development
Group: Development/Languages/C and C++
Provides: %{name}-devel:%{_libdir}/libz.a
Requires: %{name}-devel = %{version}
%description devel-static
This package contains all necessary include files and libraries needed
to develop applications that require the provided includes and
libraries.
%prep
%setup -q
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --shared
%{__make} %{?jobs:-j%jobs}
%check
make test
%install
mkdir -p $RPM_BUILD_ROOT/{%_lib,%_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man3
mkdir -p $RPM_BUILD_ROOT%{_includedir}
make install \
prefix=$RPM_BUILD_ROOT/%{_prefix} \
libdir=$RPM_BUILD_ROOT/%{_lib}
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
%{__rm} -v %{buildroot}/%{_lib}/libz.so
# static lib
make libz.a
install -m 644 libz.a $RPM_BUILD_ROOT/%{_libdir}
# manpage
install -m 644 zlib.3 $RPM_BUILD_ROOT/%{_mandir}/man3
install -m 644 zutil.h $RPM_BUILD_ROOT%{_includedir}
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
/%{_lib}/libz.so.1.2.*
/%{_lib}/libz.so.1
%files devel
%defattr(-,root,root)
%doc README ChangeLog algorithm.txt
%doc %{_mandir}/man3/zlib.3.gz
/usr/include/zlib.h
/usr/include/zconf.h
/usr/include/zutil.h
%{_libdir}/libz.so
%files devel-static
%defattr(-,root,root)
%{_libdir}/libz.a
%changelog