SHA256
3
0
forked from pool/xz

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
This commit is contained in:
Marcus Meissner 2017-06-22 18:04:11 +00:00 committed by Git OBS Bridge
parent 8bbe0cfdfe
commit 8f9b6826d8
2 changed files with 78 additions and 42 deletions

View File

@ -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 Tue Feb 21 09:03:18 UTC 2017 - adrian@suse.de

109
xz.spec
View File

@ -18,18 +18,12 @@
# avoid bootstrapping problem # avoid bootstrapping problem
%define _binary_payload w9.bzdio %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 Name: xz
Version: 5.2.3 Version: 5.2.3
Release: 0 Release: 0
Summary: A Program for Compressing Files 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 Group: Productivity/Archiving/Compression
Url: http://tukaani.org/xz/ Url: http://tukaani.org/xz/
Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz
@ -40,12 +34,9 @@ Source3: xz.keyring
Source4: xznew Source4: xznew
Source5: xznew.1 Source5: xznew.1
BuildRequires: pkgconfig BuildRequires: pkgconfig
Recommends: %{name}-lang
Provides: lzma = %{version} Provides: lzma = %{version}
Obsoletes: lzma < %{version} Obsoletes: lzma < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?lang_package:1} > 0
Recommends: %{name}-lang
%endif
%description %description
The xz command is a very powerful program for compressing files. 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 This package contains the header files and libraries needed for
compiling programs using the LZMA library. compiling programs using the LZMA library.
%if %{with static_libs}
%package static-devel %package static-devel
Summary: Static version of LZMA library Summary: Static version of LZMA library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -90,40 +80,34 @@ Requires: lzma-devel = %{version}
%description static-devel %description static-devel
Static library for the LZMA library Static library for the LZMA library
%endif
%prep %prep
%setup -q %setup -q
%build %build
%global optflags %{optflags} -D_REENTRANT -pipe -fPIE export CFLAGS="%{optflags} -D_REENTRANT -pipe -fPIE"
export LDFLAGS="-Wl,-z,relro,-z,now -pie" export LDFLAGS="-Wl,-z,relro,-z,now -pie"
%configure \ %configure \
%if ! %{with static_libs}
--disable-static \
%endif
--with-pic \ --with-pic \
--docdir=%{_docdir}/%{name} --docdir=%{_docdir}/%{name}
%if 0%{do_profiling} %if %{do_profiling}
profiledir=$(mktemp -d) make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}"
trap "rm -rf $profiledir" EXIT make check %{?_smp_mflags}
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir" make clean
time make check make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
make clean %{?_smp_mflags}
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir"
%else %else
make %{?_smp_mflags} make %{?_smp_mflags}
%endif %endif
%check %check
time make check make %{?_smp_mflags} check
%install %install
%make_install %make_install
rm -v %{buildroot}%{_libdir}/liblzma.la find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name} %find_lang %{name}
install -D -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew
install -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1
%post -n liblzma5 -p /sbin/ldconfig %post -n liblzma5 -p /sbin/ldconfig
%postun -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 %files
%defattr(-, root, root) %defattr(-, root, root)
%{_docdir}/%{name} %{_docdir}/%{name}
%{_bindir}/* %{_bindir}/lzcat
%{_mandir}/man?/* %{_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 %files -n liblzma5
%defattr(-, root, root) %defattr(-, root, root)
%{_libdir}/lib*.so.5* %{_libdir}/liblzma.so.5*
%files devel %files devel
%defattr(-, root, root) %defattr(-, root, root)
%{_includedir}/*.h %{_includedir}/lzma.h
%{_includedir}/lzma %dir %{_includedir}/lzma/
%{_libdir}/lib*.so %{_includedir}/lzma/*
%{_libdir}/pkgconfig/*.pc %{_libdir}/liblzma.so
%{_libdir}/pkgconfig/liblzma.pc
%if %{with static_libs}
%files static-devel %files static-devel
%defattr(-, root, root) %defattr(-, root, root)
%{_libdir}/*.a %{_libdir}/liblzma.a
%endif
%changelog %changelog