3 %bcond_without tests # don't perform make check
4 %bcond_without asm # ix86 asm optimizations
7 # Speed-optimized CRC64 using slicing-by-four algorithm. This uses only i386
8 # instructions, but it is optimized for i686 and later (including e.g. Pentium
9 # II/III/IV, Athlon XP, and Core 2).
13 %if "%{pld_release}" == "ac"
17 Summary: LZMA Encoder/Decoder
18 Summary(pl.UTF-8): Koder/Dekoder LZMA
23 License: LGPL v2.1+, helper scripts on GPL v2+
24 Group: Applications/Archiving
25 Source0: https://tukaani.org/xz/%{name}-%{version}.tar.bz2
26 # Source0-md5: 2138d1c1ccd9cc4c972fd89cff0bb2b4
27 Patch0: %{name}-parallel.patch
28 Patch1: %{name}-memlimit.patch
29 Patch2: %{name}-ksh.patch
30 URL: https://tukaani.org/xz/
31 %{?with_asm:BuildRequires: gcc >= 5:3.4}
32 BuildRequires: rpm >= 4.4.9-56
33 BuildRequires: rpmbuild(macros) >= 1.402
34 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
36 Provides: lzma = %{epoch}:%{version}-%{release}
37 Obsoletes: lzma < 1:4.999.6
38 Conflicts: rpm < 4.4.9
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 LZMA is default and general compression method of 7z format in 7-Zip
43 program. LZMA provides high compression ratio and very fast
44 decompression, so it is very suitable for embedded applications. For
45 example, it can be used for ROM (firmware) compressing.
49 - Compressing speed: 500 KB/s on 1 GHz CPU
50 - Decompressing speed:
51 - 8-12 MB/s on 1 GHz Intel Pentium 3 or AMD Athlon.
52 - 500-1000 KB/s on 100 MHz ARM, MIPS, PowerPC or other simple RISC
54 - Small memory requirements for decompressing: 8-32 KB + dictionary
56 - Small code size for decompressing: 2-8 KB (depending from speed
59 %description -l pl.UTF-8
60 LZMA jest domyślnym i ogólnym algorytmem kompresji formatu 7z
61 stosowanego przez 7-Zip. LZMA zapewnia wysoki stopień kompresji i
62 bardzo szybką dekompresję, więc nadaje się do zastosowań osadzonych.
63 Przykładowo, może być użyty do kompresji ROM-u (firmware'u).
67 - Szybkość kompresowania: 500 KB/s na 1 GHz procesorze,
68 - Szybkość dekompresowania:
69 - 8-12 MB/s na 1 GHz Pentium 3 lub Athlonie,
70 - 500-1000 KB/s na 100 MHz procesorach ARM, MIPS, PowerPC lub innych
72 - Mała ilość pamięci potrzebna do dekompresowania: 8-32 KB + rozmiar
74 - Mały rozmiar kodu dekompresującego: 2-8 KB (w zależności od opcji
78 Summary: LZMA shared library
79 Summary(pl.UTF-8): Biblioteka współdzielona LZMA
81 Provides: lzma-libs = %{epoch}:%{version}-%{release}
82 Obsoletes: lzma-libs < 1:4.999.6
87 %description libs -l pl.UTF-8
88 Biblioteka współdzielona LZMA.
91 Summary: Header file for LZMA library
92 Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA
93 Group: Development/Libraries
94 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
95 Provides: lzma-devel = %{epoch}:%{version}-%{release}
96 Obsoletes: lzma-devel < 1:4.999.6
99 Header file for LZMA library.
101 %description devel -l pl.UTF-8
102 Plik nagłówkowy biblioteki LZMA.
105 Summary: LZMA static library
106 Summary(pl.UTF-8): Biblioteka statyczna LZMA
107 Group: Development/Libraries
108 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
109 Provides: lzma-static = %{epoch}:%{version}-%{release}
110 Obsoletes: lzma-static < 1:4.999.6
115 %description static -l pl.UTF-8
116 Biblioteka statyczna LZMA.
126 %{!?with_asm:--disable-assembler}
129 %{?with_tests:%{__make} check}
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{/etc/env.d,/%{_lib}}
136 DESTDIR=$RPM_BUILD_ROOT
138 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
140 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
141 cp -a doc/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
143 mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib}
144 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/liblzma.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/liblzma.so
146 mv $RPM_BUILD_ROOT%{_mandir}/fr{_FR,}
148 echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT
153 rm -rf $RPM_BUILD_ROOT
155 %post libs -p /sbin/ldconfig
156 %postun libs -p /sbin/ldconfig
158 %files -f %{name}.lang
159 %defattr(644,root,root,755)
160 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT
161 %attr(755,root,root) %{_bindir}/lz*
162 %attr(755,root,root) %{_bindir}/unlzma
163 %attr(755,root,root) %{_bindir}/unxz
164 %attr(755,root,root) %{_bindir}/xz*
165 %{_mandir}/man1/lz*.1*
166 %{_mandir}/man1/unlzma.1*
167 %{_mandir}/man1/unxz.1*
168 %{_mandir}/man1/xz*.1*
169 %lang(de) %{_mandir}/de/man1/lz*.1*
170 %lang(de) %{_mandir}/de/man1/unlzma.1*
171 %lang(de) %{_mandir}/de/man1/unxz.1*
172 %lang(de) %{_mandir}/de/man1/xz*.1*
173 %lang(fr) %{_mandir}/fr/man1/lz*.1*
174 %lang(fr) %{_mandir}/fr/man1/unlzma.1*
175 %lang(fr) %{_mandir}/fr/man1/unxz.1*
176 %lang(fr) %{_mandir}/fr/man1/xz*.1*
179 %defattr(644,root,root,755)
180 %doc AUTHORS COPYING README THANKS
182 %attr(755,root,root) /%{_lib}/liblzma.so.*.*.*
183 %attr(755,root,root) %ghost /%{_lib}/liblzma.so.5
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/liblzma.so
188 %{_libdir}/liblzma.la
189 %{_includedir}/lzma.h
191 %{_pkgconfigdir}/liblzma.pc
192 %{_examplesdir}/%{name}-%{version}
195 %defattr(644,root,root,755)