From 5b7bbe756313fb2d252e14d79fbd5121de7900f84f2aaa5ce83742ea361abf74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 25 Sep 2014 08:07:29 +0000 Subject: [PATCH] - Install examples to cover another angle from bnc#890228 - Cleanup with spec-cleaner OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=23 --- zlib.changes | 6 ++++++ zlib.spec | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/zlib.changes b/zlib.changes index 243d04a..c7cac0a 100644 --- a/zlib.changes +++ b/zlib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 25 08:04:55 UTC 2014 - tchvatal@suse.com + +- Install examples to cover another angle from bnc#890228 +- Cleanup with spec-cleaner + ------------------------------------------------------------------- Mon Jul 29 12:37:19 UTC 2013 - mvyskocil@suse.com diff --git a/zlib.spec b/zlib.spec index 18e2269..1b79e28 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,7 +1,7 @@ # # spec file for package zlib # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 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 @@ -17,7 +17,6 @@ %bcond_with profiling - Name: zlib Version: 1.2.8 Release: 0 @@ -71,7 +70,7 @@ Summary: Include Files and Libraries mandatory for Development Group: Development/Languages/C and C++ Requires: glibc-devel Requires: libz1 = %{version} -Provides: libz:/usr/include/zlib.h +Provides: libz:%{_includedir}/zlib.h # bug437293 %ifarch ppc64 Obsoletes: zlib-devel-64bit @@ -108,7 +107,7 @@ profiledir=$(mktemp -d) trap "rm -rf $profiledir" EXIT CC="gcc" ./configure --shared --prefix=%{_prefix} --libdir=/%{_lib} make CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" %{?_smp_mflags} -time make check +time make check %{?_smp_mflags} make clean make CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" %{?_smp_mflags} %else @@ -118,11 +117,11 @@ make %{?_smp_mflags} %endif %check -time make check +time make check %{?_smp_mflags} %install mkdir -p %{buildroot}%{_libdir} -make install DESTDIR="%buildroot" +make DESTDIR=%{buildroot} install %{?_smp_mflags} ln -s -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so rm -v %{buildroot}/%{_lib}/libz.so # static lib @@ -132,6 +131,9 @@ mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir} # manpage install -m 644 zlib.3 %{buildroot}%{_mandir}/man3 install -m 644 zutil.h %{buildroot}%{_includedir} +# examples +mkdir -p %{buildroot}%{_docdir}/%{name} +cp -r examples/ %{buildroot}%{_docdir}/%{name}/ %post -n libz1 -p /sbin/ldconfig @@ -145,6 +147,9 @@ install -m 644 zutil.h %{buildroot}%{_includedir} %files devel %defattr(-,root,root) %doc README ChangeLog +%dir %{_docdir}/%{name}/ +%dir %{_docdir}/%{name}/examples +%{_docdir}/%{name}/examples/* %{_mandir}/man3/zlib.3.gz %{_includedir}/zlib.h %{_includedir}/zconf.h