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"
19 Summary: LZMA Encoder/Decoder
20 Summary(pl.UTF-8): Koder/Dekoder LZMA
23 Release: 0.%{subver}.%{rel}
25 License: LGPL v2.1+, helper scripts on GPL v2+
26 Group: Applications/Archiving
27 Source0: http://tukaani.org/xz/%{name}-%{version}%{subver}.tar.gz
28 # Source0-md5: f2073579b6da2fe35d453adee1aaf1b2
29 URL: http://tukaani.org/xz/
30 %{?with_asm:BuildRequires: gcc >= 5:3.4}
31 BuildRequires: rpm >= 4.4.9-56
32 BuildRequires: rpmbuild(macros) >= 1.402
33 BuildRequires: sed >= 4.0
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)
43 LZMA is default and general compression method of 7z format in 7-Zip
44 program. LZMA provides high compression ratio and very fast
45 decompression, so it is very suitable for embedded applications. For
46 example, it can be used for ROM (firmware) compressing.
50 - Compressing speed: 500 KB/s on 1 GHz CPU
51 - Decompressing speed:
52 - 8-12 MB/s on 1 GHz Intel Pentium 3 or AMD Athlon.
53 - 500-1000 KB/s on 100 MHz ARM, MIPS, PowerPC or other simple RISC
55 - Small memory requirements for decompressing: 8-32 KB + dictionary
57 - Small code size for decompressing: 2-8 KB (depending from speed
60 %description -l pl.UTF-8
61 LZMA jest domyślnym i ogólnym algorytmem kompresji formatu 7z
62 stosowanego przez 7-Zip. LZMA zapewnia wysoki stopień kompresji i
63 bardzo szybką dekompresję, więc nadaje się do zastosowań osadzonych.
64 Przykładowo, może być użyty do kompresji ROM-u (firmware'u).
68 - Szybkość kompresowania: 500 KB/s na 1 GHz procesorze,
69 - Szybkość dekompresowania:
70 - 8-12 MB/s na 1 GHz Pentium 3 lub Athlonie,
71 - 500-1000 KB/s na 100 MHz procesorach ARM, MIPS, PowerPC lub innych
73 - Mała ilość pamięci potrzebna do dekompresowania: 8-32 KB + rozmiar
75 - Mały rozmiar kodu dekompresującego: 2-8 KB (w zależności od opcji
79 Summary: LZMA shared library
80 Summary(pl.UTF-8): Biblioteka współdzielona LZMA
82 Provides: lzma-libs = %{epoch}:%{version}-%{release}
83 Obsoletes: lzma-libs < 1:4.999.6
88 %description libs -l pl.UTF-8
89 Biblioteka współdzielona LZMA.
92 Summary: Header file for LZMA library
93 Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA
94 Group: Development/Libraries
95 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
96 Provides: lzma-devel = %{epoch}:%{version}-%{release}
97 Obsoletes: lzma-devel < 1:4.999.6
100 Header file for LZMA library.
102 %description devel -l pl.UTF-8
103 Plik nagłówkowy biblioteki LZMA.
106 Summary: LZMA static library
107 Summary(pl.UTF-8): Biblioteka statyczna LZMA
108 Group: Development/Libraries
109 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
110 Provides: lzma-static = %{epoch}:%{version}-%{release}
111 Obsoletes: lzma-static < 1:4.999.6
116 %description static -l pl.UTF-8
117 Biblioteka statyczna LZMA.
120 %setup -q -n %{name}-%{version}%{subver}
124 %{!?with_asm:--disable-assembler}
127 %{?with_tests:%{__make} check}
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT/{etc/env.d,%{_lib}}
134 DESTDIR=$RPM_BUILD_ROOT
136 mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib}
137 ln -sf /%{_lib}/liblzma.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/liblzma.so
139 echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT
145 rm -rf $RPM_BUILD_ROOT
147 %post libs -p /sbin/ldconfig
148 %postun libs -p /sbin/ldconfig
151 %defattr(644,root,root,755)
152 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT
153 %attr(755,root,root) %{_bindir}/*lz*
154 %attr(755,root,root) %{_bindir}/*xz*
155 %{_mandir}/man1/[lx]z*.1*
156 %{_mandir}/man1/un[lx]z*.1*
158 %files libs -f %{name}.lang
159 %defattr(644,root,root,755)
160 %doc AUTHORS COPYING README THANKS
162 %attr(755,root,root) /%{_lib}/liblzma.so.*.*.*
163 %attr(755,root,root) %ghost /%{_lib}/liblzma.so.0
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/liblzma.so
168 %{_libdir}/liblzma.la
169 %{_includedir}/lzma.h
171 %{_pkgconfigdir}/liblzma.pc
174 %defattr(644,root,root,755)