]> git.pld-linux.org Git - packages/xz.git/blobdiff - xz.spec
Revert back to 5.4.6 as 5.6.x are BACKDOORED! https://www.openwall.com/lists/oss...
[packages/xz.git] / xz.spec
diff --git a/xz.spec b/xz.spec
index 6de54fc2c8d912cf63b7a474ed2ee3dc03967a20..8094d11af072c300704b8956038087613314bf1e 100644 (file)
--- a/xz.spec
+++ b/xz.spec
@@ -1,21 +1,41 @@
 #
 # Conditional build:
-%bcond_without tests   # don't perform make check
-#
-%define        snap    alpha
+%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
+# instructions, but it is optimized for i686 and later (including e.g. Pentium
+# II/III/IV, Athlon XP, and Core 2).
+%undefine      with_asm
+%endif
+
+%if "%{pld_release}" == "ac"
+%undefine      with_asm
+%endif
+
 Summary:       LZMA Encoder/Decoder
 Summary(pl.UTF-8):     Koder/Dekoder LZMA
-Name:          lzma
-Version:       4.999.5
-Release:       0.%{snap}.2
-Epoch:         1
+Name:          xz
+Version:       5.4.6
+Release:       2
+Epoch:         2
 License:       LGPL v2.1+, helper scripts on GPL v2+
 Group:         Applications/Archiving
-Source0:       http://tukaani.org/lzma/%{name}-%{version}%{snap}.tar.gz
-# Source0-md5: db736e080858a7c34357960254dda280
-Patch0:                %{name}-memlimit.patch
-URL:           http://tukaani.org/lzma/
-BuildRequires: rpmbuild(macros) >= 1.402
+Source0:       https://github.com/tukaani-project/xz/releases/download/v%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: 098549e685e27620f2fe2883b02c35f2
+Patch0:                %{name}-parallel.patch
+Patch1:                %{name}-memlimit.patch
+URL:           https://tukaani.org/xz/
+%{?with_asm:BuildRequires:     gcc >= 5:3.4}
+BuildRequires: rpm >= 4.4.9-56
+BuildRequires: rpmbuild(macros) >= 1.527
+Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Suggests:      mktemp
+Provides:      lzma = %{epoch}:%{version}-%{release}
+Obsoletes:     lzma < 1:4.999.6
+Conflicts:     rpm < 4.4.9
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -58,6 +78,8 @@ Cechy LZMA:
 Summary:       LZMA shared library
 Summary(pl.UTF-8):     Biblioteka współdzielona LZMA
 Group:         Libraries
+Provides:      lzma-libs = %{epoch}:%{version}-%{release}
+Obsoletes:     lzma-libs < 1:4.999.6
 
 %description libs
 LZMA shared library.
@@ -69,7 +91,9 @@ 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
 
 %description devel
 Header file for LZMA library.
@@ -82,6 +106,8 @@ Summary:     LZMA static library
 Summary(pl.UTF-8):     Biblioteka statyczna LZMA
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+Provides:      lzma-static = %{epoch}:%{version}-%{release}
+Obsoletes:     lzma-static < 1:4.999.6
 
 %description static
 LZMA static library.
@@ -90,27 +116,34 @@ LZMA static library.
 Biblioteka statyczna LZMA.
 
 %prep
-%setup -q -n %{name}-%{version}%{snap}
+%setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
-%configure
-
+%configure \
+       %{!?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 '#LZMA_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/LZMA_OPT
+echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT
 
 %find_lang %{name}
 
@@ -120,28 +153,60 @@ 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/LZMA_OPT
-%attr(755,root,root) %{_bindir}/*lz*
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT
+%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*
-
-%files libs -f %{name}.lang
+%{_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 TODO
-%doc doc/{bugs,faq,file-format,history,lzma-intro}.txt
+%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)
-%doc doc/liblzma-*.txt
 %attr(755,root,root) %{_libdir}/liblzma.so
 %{_libdir}/liblzma.la
 %{_includedir}/lzma.h
 %{_includedir}/lzma
-%{_pkgconfigdir}/lzma.pc
+%{_pkgconfigdir}/liblzma.pc
+%{_examplesdir}/%{name}-%{version}
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/liblzma.a
+%endif
This page took 0.062514 seconds and 4 git commands to generate.