From 8f9b6826d80f477bb934ece0997fb230683b3f8dbc54358ad4e9ffbfd804e48c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 22 Jun 2017 18:04:11 +0000 Subject: [PATCH 1/2] Accepting request 505452 from home:pluskalm:branches:Base:System - Simplify spec file conditions - Clenup profiled building - Use full lists of files OBS-URL: https://build.opensuse.org/request/show/505452 OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=89 --- xz.changes | 7 ++++ xz.spec | 113 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 78 insertions(+), 42 deletions(-) diff --git a/xz.changes b/xz.changes index 15fe4db..6c4506a 100644 --- a/xz.changes +++ b/xz.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 21 14:11:44 UTC 2017 - mpluskal@suse.com + +- Simplify spec file conditions +- Clenup profiled building +- Use full lists of files + ------------------------------------------------------------------- Tue Feb 21 09:03:18 UTC 2017 - adrian@suse.de diff --git a/xz.spec b/xz.spec index e14cb1c..551ff69 100644 --- a/xz.spec +++ b/xz.spec @@ -18,18 +18,12 @@ # avoid bootstrapping problem %define _binary_payload w9.bzdio -%if 0%{?suse_version} < 1130 -%define do_profiling 0 -%endif -%ifarch aarch64 %{arm} %{sparc} -%define do_profiling 0 -%endif -%bcond_without static_libs + Name: xz Version: 5.2.3 Release: 0 Summary: A Program for Compressing Files -License: LGPL-2.1+ and GPL-2.0+ +License: LGPL-2.1+ AND GPL-2.0+ Group: Productivity/Archiving/Compression Url: http://tukaani.org/xz/ Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz @@ -40,12 +34,9 @@ Source3: xz.keyring Source4: xznew Source5: xznew.1 BuildRequires: pkgconfig +Recommends: %{name}-lang Provides: lzma = %{version} Obsoletes: lzma < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?lang_package:1} > 0 -Recommends: %{name}-lang -%endif %description The xz command is a very powerful program for compressing files. @@ -82,7 +73,6 @@ Obsoletes: lzma-alpha-devel < %{version} This package contains the header files and libraries needed for compiling programs using the LZMA library. -%if %{with static_libs} %package static-devel Summary: Static version of LZMA library Group: Development/Libraries/C and C++ @@ -90,40 +80,34 @@ Requires: lzma-devel = %{version} %description static-devel Static library for the LZMA library -%endif %prep %setup -q %build -%global optflags %{optflags} -D_REENTRANT -pipe -fPIE +export CFLAGS="%{optflags} -D_REENTRANT -pipe -fPIE" export LDFLAGS="-Wl,-z,relro,-z,now -pie" %configure \ -%if ! %{with static_libs} - --disable-static \ -%endif - --with-pic \ - --docdir=%{_docdir}/%{name} -%if 0%{do_profiling} -profiledir=$(mktemp -d) -trap "rm -rf $profiledir" EXIT -make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" -time make check -make clean %{?_smp_mflags} -make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir" + --with-pic \ + --docdir=%{_docdir}/%{name} +%if %{do_profiling} + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" + make check %{?_smp_mflags} + make clean + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" %else -make %{?_smp_mflags} + make %{?_smp_mflags} %endif %check -time make check +make %{?_smp_mflags} check %install %make_install -rm -v %{buildroot}%{_libdir}/liblzma.la +find %{buildroot} -type f -name "*.la" -delete -print %find_lang %{name} -install -D -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew -install -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 +install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew +install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 %post -n liblzma5 -p /sbin/ldconfig %postun -n liblzma5 -p /sbin/ldconfig @@ -134,24 +118,69 @@ install -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 %files %defattr(-, root, root) %{_docdir}/%{name} -%{_bindir}/* -%{_mandir}/man?/* +%{_bindir}/lzcat +%{_bindir}/lzcmp +%{_bindir}/lzdiff +%{_bindir}/lzegrep +%{_bindir}/lzfgrep +%{_bindir}/lzgrep +%{_bindir}/lzless +%{_bindir}/lzma +%{_bindir}/lzmadec +%{_bindir}/lzmainfo +%{_bindir}/lzmore +%{_bindir}/unlzma +%{_bindir}/unxz +%{_bindir}/xz +%{_bindir}/xzcat +%{_bindir}/xzcmp +%{_bindir}/xzdec +%{_bindir}/xzdiff +%{_bindir}/xzegrep +%{_bindir}/xzfgrep +%{_bindir}/xzgrep +%{_bindir}/xzless +%{_bindir}/xzmore +%{_bindir}/xznew +%{_mandir}/man1/lzcat.1%{ext_man} +%{_mandir}/man1/lzcmp.1%{ext_man} +%{_mandir}/man1/lzdiff.1%{ext_man} +%{_mandir}/man1/lzegrep.1%{ext_man} +%{_mandir}/man1/lzfgrep.1%{ext_man} +%{_mandir}/man1/lzgrep.1%{ext_man} +%{_mandir}/man1/lzless.1%{ext_man} +%{_mandir}/man1/lzma.1%{ext_man} +%{_mandir}/man1/lzmadec.1%{ext_man} +%{_mandir}/man1/lzmainfo.1%{ext_man} +%{_mandir}/man1/lzmore.1%{ext_man} +%{_mandir}/man1/unlzma.1%{ext_man} +%{_mandir}/man1/unxz.1%{ext_man} +%{_mandir}/man1/xz.1%{ext_man} +%{_mandir}/man1/xzcat.1%{ext_man} +%{_mandir}/man1/xzcmp.1%{ext_man} +%{_mandir}/man1/xzdec.1%{ext_man} +%{_mandir}/man1/xzdiff.1%{ext_man} +%{_mandir}/man1/xzegrep.1%{ext_man} +%{_mandir}/man1/xzfgrep.1%{ext_man} +%{_mandir}/man1/xzgrep.1%{ext_man} +%{_mandir}/man1/xzless.1%{ext_man} +%{_mandir}/man1/xzmore.1%{ext_man} +%{_mandir}/man1/xznew.1%{ext_man} %files -n liblzma5 %defattr(-, root, root) -%{_libdir}/lib*.so.5* +%{_libdir}/liblzma.so.5* %files devel %defattr(-, root, root) -%{_includedir}/*.h -%{_includedir}/lzma -%{_libdir}/lib*.so -%{_libdir}/pkgconfig/*.pc +%{_includedir}/lzma.h +%dir %{_includedir}/lzma/ +%{_includedir}/lzma/* +%{_libdir}/liblzma.so +%{_libdir}/pkgconfig/liblzma.pc -%if %{with static_libs} %files static-devel %defattr(-, root, root) -%{_libdir}/*.a -%endif +%{_libdir}/liblzma.a %changelog From 9894a94cf7195f052016a20e4df9fb252252978809e0af5ff095eabecc72d8c1 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Sun, 25 Jun 2017 17:03:45 +0000 Subject: [PATCH 2/2] Accepting request 506129 from home:AndreasStieger:branches:Archiving - fix CentOS/RHEL builds after clean-up OBS-URL: https://build.opensuse.org/request/show/506129 OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=90 --- xz.changes | 5 +++++ xz.spec | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/xz.changes b/xz.changes index 6c4506a..170457e 100644 --- a/xz.changes +++ b/xz.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jun 25 11:37:03 UTC 2017 - astieger@suse.com + +- fix CentOS/RHEL builds after clean-up + ------------------------------------------------------------------- Wed Jun 21 14:11:44 UTC 2017 - mpluskal@suse.com diff --git a/xz.spec b/xz.spec index 551ff69..b07232b 100644 --- a/xz.spec +++ b/xz.spec @@ -18,7 +18,6 @@ # avoid bootstrapping problem %define _binary_payload w9.bzdio - Name: xz Version: 5.2.3 Release: 0 @@ -34,9 +33,12 @@ Source3: xz.keyring Source4: xznew Source5: xznew.1 BuildRequires: pkgconfig -Recommends: %{name}-lang Provides: lzma = %{version} Obsoletes: lzma < %{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?lang_package:1} +Recommends: %{name}-lang +%endif %description The xz command is a very powerful program for compressing files. @@ -90,7 +92,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now -pie" %configure \ --with-pic \ --docdir=%{_docdir}/%{name} -%if %{do_profiling} +%if 0%{?do_profiling} make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" make check %{?_smp_mflags} make clean @@ -103,7 +105,11 @@ export LDFLAGS="-Wl,-z,relro,-z,now -pie" make %{?_smp_mflags} check %install +%if 0%{?make_install:1} %make_install +%else +make DESTDIR=%{buildroot} install %{?_smp_mflags} # +%endif find %{buildroot} -type f -name "*.la" -delete -print %find_lang %{name} install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew @@ -112,8 +118,10 @@ install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 %post -n liblzma5 -p /sbin/ldconfig %postun -n liblzma5 -p /sbin/ldconfig +%if 0%{?lang_package:1} %files lang -f %{name}.lang %defattr(-, root, root) +%endif %files %defattr(-, root, root) @@ -166,6 +174,9 @@ install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 %{_mandir}/man1/xzless.1%{ext_man} %{_mandir}/man1/xzmore.1%{ext_man} %{_mandir}/man1/xznew.1%{ext_man} +%if 0%{!?lang_package:1} +%{_datadir}/locale/*/LC_MESSAGES/xz.mo +%endif %files -n liblzma5 %defattr(-, root, root)