X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=xz.spec;h=8094d11af072c300704b8956038087613314bf1e;hb=HEAD;hp=5ed4291164d8c9308f67594fae7ecf36a5636dfd;hpb=5c4bddac1b384a2117dc30a6120b1482b152e353;p=packages%2Fxz.git diff --git a/xz.spec b/xz.spec index 5ed4291..3e419ca 100644 --- a/xz.spec +++ b/xz.spec @@ -1,7 +1,8 @@ # # Conditional build: -%bcond_without tests # don't perform make check +%bcond_without tests # don't perform make check %bcond_without asm # ix86 asm optimizations +%bcond_without static_libs # static library %ifnarch %{ix86} # Speed-optimized CRC64 using slicing-by-four algorithm. This uses only i386 @@ -14,23 +15,20 @@ %undefine with_asm %endif -%define subver beta -%define rel 2 Summary: LZMA Encoder/Decoder Summary(pl.UTF-8): Koder/Dekoder LZMA Name: xz -Version: 4.999.9 -Release: 0.%{subver}.%{rel} -Epoch: 1 +Version: 5.6.2 +Release: 1 +Epoch: 2 License: LGPL v2.1+, helper scripts on GPL v2+ Group: Applications/Archiving -Source0: http://tukaani.org/xz/%{name}-%{version}%{subver}.tar.gz -# Source0-md5: f2073579b6da2fe35d453adee1aaf1b2 -URL: http://tukaani.org/xz/ +Source0: https://github.com/tukaani-project/xz/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +# Source0-md5: 4097d4659d75ddd373c7fbc470168eab +URL: https://tukaani.org/xz/ %{?with_asm:BuildRequires: gcc >= 5:3.4} BuildRequires: rpm >= 4.4.9-56 -BuildRequires: rpmbuild(macros) >= 1.402 -BuildRequires: sed >= 4.0 +BuildRequires: rpmbuild(macros) >= 1.527 Requires: %{name}-libs = %{epoch}:%{version}-%{release} Suggests: mktemp Provides: lzma = %{epoch}:%{version}-%{release} @@ -38,7 +36,6 @@ Obsoletes: lzma < 1:4.999.6 Conflicts: rpm < 4.4.9 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) - %description LZMA is default and general compression method of 7z format in 7-Zip program. LZMA provides high compression ratio and very fast @@ -92,7 +89,7 @@ Biblioteka współdzielona LZMA. Summary: Header file for LZMA library Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA Group: Development/Libraries -Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Provides: lzma-devel = %{epoch}:%{version}-%{release} Obsoletes: lzma-devel < 1:4.999.6 @@ -117,29 +114,34 @@ LZMA static library. Biblioteka statyczna LZMA. %prep -%setup -q -n %{name}-%{version}%{subver} +%setup -q %build %configure \ - %{!?with_asm:--disable-assembler} + %{!?with_asm:--disable-assembler} \ + %{__enable_disable static_libs static} %{__make} %{?with_tests:%{__make} check} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/{etc/env.d,%{_lib}} +install -d $RPM_BUILD_ROOT{/etc/env.d,/%{_lib}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} + +install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +cp -a doc/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} + mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib} -ln -sf /%{_lib}/liblzma.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/liblzma.so +ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/liblzma.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/liblzma.so echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT -:> %{name}.lang -#%%find_lang %{name} +%find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT @@ -147,20 +149,48 @@ rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig -%files +%files -f %{name}.lang %defattr(644,root,root,755) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT -%attr(755,root,root) %{_bindir}/*lz* -%attr(755,root,root) %{_bindir}/*xz* -%{_mandir}/man1/[lx]z*.1* -%{_mandir}/man1/un[lx]z*.1* - -%files libs -f %{name}.lang +%attr(755,root,root) %{_bindir}/lz* +%attr(755,root,root) %{_bindir}/unlzma +%attr(755,root,root) %{_bindir}/unxz +%attr(755,root,root) %{_bindir}/xz* +%{_mandir}/man1/lz*.1* +%{_mandir}/man1/unlzma.1* +%{_mandir}/man1/unxz.1* +%{_mandir}/man1/xz*.1* +%lang(de) %{_mandir}/de/man1/lz*.1* +%lang(de) %{_mandir}/de/man1/unlzma.1* +%lang(de) %{_mandir}/de/man1/unxz.1* +%lang(de) %{_mandir}/de/man1/xz*.1* +%lang(fr) %{_mandir}/fr/man1/lz*.1* +%lang(fr) %{_mandir}/fr/man1/unlzma.1* +%lang(fr) %{_mandir}/fr/man1/unxz.1* +%lang(fr) %{_mandir}/fr/man1/xz*.1* +%lang(ko) %{_mandir}/ko/man1/lz*.1* +%lang(ko) %{_mandir}/ko/man1/unlzma.1* +%lang(ko) %{_mandir}/ko/man1/unxz.1* +%lang(ko) %{_mandir}/ko/man1/xz*.1* +%lang(pt_BR) %{_mandir}/pt_BR/man1/lz*.1* +%lang(pt_BR) %{_mandir}/pt_BR/man1/unlzma.1* +%lang(pt_BR) %{_mandir}/pt_BR/man1/unxz.1* +%lang(pt_BR) %{_mandir}/pt_BR/man1/xz*.1* +%lang(ro) %{_mandir}/ro/man1/lz*.1* +%lang(ro) %{_mandir}/ro/man1/unlzma.1* +%lang(ro) %{_mandir}/ro/man1/unxz.1* +%lang(ro) %{_mandir}/ro/man1/xz*.1* +%lang(uk) %{_mandir}/uk/man1/lz*.1* +%lang(uk) %{_mandir}/uk/man1/unlzma.1* +%lang(uk) %{_mandir}/uk/man1/unxz.1* +%lang(uk) %{_mandir}/uk/man1/xz*.1* + +%files libs %defattr(644,root,root,755) %doc AUTHORS COPYING README THANKS %doc doc/*.txt %attr(755,root,root) /%{_lib}/liblzma.so.*.*.* -%attr(755,root,root) %ghost /%{_lib}/liblzma.so.0 +%attr(755,root,root) %ghost /%{_lib}/liblzma.so.5 %files devel %defattr(644,root,root,755) @@ -169,7 +199,10 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/lzma.h %{_includedir}/lzma %{_pkgconfigdir}/liblzma.pc +%{_examplesdir}/%{name}-%{version} +%if %{with static_libs} %files static %defattr(644,root,root,755) %{_libdir}/liblzma.a +%endif