]>
Commit | Line | Data |
---|---|---|
1846bd29 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # don't perform make check | |
5c4bddac ER |
4 | %bcond_without asm # ix86 asm optimizations |
5 | ||
6 | %ifnarch %{ix86} | |
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). | |
10 | %undefine with_asm | |
11 | %endif | |
521b5888 ER |
12 | |
13 | %if "%{pld_release}" == "ac" | |
14 | %undefine with_asm | |
15 | %endif | |
16 | ||
82d22baf | 17 | Summary: LZMA Encoder/Decoder |
34fad00c | 18 | Summary(pl.UTF-8): Koder/Dekoder LZMA |
d73f94d2 | 19 | Name: xz |
de766489 | 20 | Version: 5.0.1 |
42322a5b | 21 | Release: 1 |
92626cfe | 22 | Epoch: 1 |
9acc8826 | 23 | License: LGPL v2.1+, helper scripts on GPL v2+ |
82d22baf | 24 | Group: Applications/Archiving |
42322a5b | 25 | Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz |
de766489 | 26 | # Source0-md5: 60044a5701997e4e0904257197208ea9 |
d73f94d2 | 27 | URL: http://tukaani.org/xz/ |
521b5888 ER |
28 | %{?with_asm:BuildRequires: gcc >= 5:3.4} |
29 | BuildRequires: rpm >= 4.4.9-56 | |
56d2abb2 | 30 | BuildRequires: rpmbuild(macros) >= 1.402 |
b8f8253e | 31 | BuildRequires: sed >= 4.0 |
01610c22 | 32 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
521b5888 | 33 | Suggests: mktemp |
99e7eab7 AM |
34 | Provides: lzma = %{epoch}:%{version}-%{release} |
35 | Obsoletes: lzma < 1:4.999.6 | |
521b5888 | 36 | Conflicts: rpm < 4.4.9 |
82d22baf | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
521b5888 | 39 | |
82d22baf | 40 | %description |
41 | LZMA is default and general compression method of 7z format in 7-Zip | |
42 | program. LZMA provides high compression ratio and very fast | |
43 | decompression, so it is very suitable for embedded applications. For | |
44 | example, it can be used for ROM (firmware) compressing. | |
45 | ||
46 | LZMA features: | |
47 | ||
48 | - Compressing speed: 500 KB/s on 1 GHz CPU | |
49 | - Decompressing speed: | |
50 | - 8-12 MB/s on 1 GHz Intel Pentium 3 or AMD Athlon. | |
51 | - 500-1000 KB/s on 100 MHz ARM, MIPS, PowerPC or other simple RISC | |
52 | CPU. | |
2f88d337 | 53 | - Small memory requirements for decompressing: 8-32 KB + dictionary |
54 | size | |
82d22baf | 55 | - Small code size for decompressing: 2-8 KB (depending from speed |
56 | optimizations) | |
57 | ||
fb275d27 JR |
58 | %description -l pl.UTF-8 |
59 | LZMA jest domyślnym i ogólnym algorytmem kompresji formatu 7z | |
60 | stosowanego przez 7-Zip. LZMA zapewnia wysoki stopień kompresji i | |
61 | bardzo szybką dekompresję, więc nadaje się do zastosowań osadzonych. | |
62 | Przykładowo, może być użyty do kompresji ROM-u (firmware'u). | |
82d22baf | 63 | |
64 | Cechy LZMA: | |
65 | ||
fb275d27 JR |
66 | - Szybkość kompresowania: 500 KB/s na 1 GHz procesorze, |
67 | - Szybkość dekompresowania: | |
82d22baf | 68 | - 8-12 MB/s na 1 GHz Pentium 3 lub Athlonie, |
69 | - 500-1000 KB/s na 100 MHz procesorach ARM, MIPS, PowerPC lub innych | |
70 | prostych RISC-ach, | |
fb275d27 JR |
71 | - Mała ilość pamięci potrzebna do dekompresowania: 8-32 KB + rozmiar |
72 | słownika, | |
73 | - Mały rozmiar kodu dekompresującego: 2-8 KB (w zależności od opcji | |
82d22baf | 74 | optymalizacji). |
75 | ||
1010510a ER |
76 | %package libs |
77 | Summary: LZMA shared library | |
34fad00c | 78 | Summary(pl.UTF-8): Biblioteka współdzielona LZMA |
1010510a | 79 | Group: Libraries |
99e7eab7 AM |
80 | Provides: lzma-libs = %{epoch}:%{version}-%{release} |
81 | Obsoletes: lzma-libs < 1:4.999.6 | |
1010510a ER |
82 | |
83 | %description libs | |
84d12552 JB |
84 | LZMA shared library. |
85 | ||
fb275d27 JR |
86 | %description libs -l pl.UTF-8 |
87 | Biblioteka współdzielona LZMA. | |
1010510a | 88 | |
90fc2073 | 89 | %package devel |
84d12552 | 90 | Summary: Header file for LZMA library |
34fad00c | 91 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA |
d9b6428a | 92 | Group: Development/Libraries |
b8dda4f2 | 93 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
99e7eab7 AM |
94 | Provides: lzma-devel = %{epoch}:%{version}-%{release} |
95 | Obsoletes: lzma-devel < 1:4.999.6 | |
90fc2073 | 96 | |
97 | %description devel | |
84d12552 | 98 | Header file for LZMA library. |
6e34e97f | 99 | |
fb275d27 JR |
100 | %description devel -l pl.UTF-8 |
101 | Plik nagłówkowy biblioteki LZMA. | |
90fc2073 | 102 | |
1010510a ER |
103 | %package static |
104 | Summary: LZMA static library | |
34fad00c | 105 | Summary(pl.UTF-8): Biblioteka statyczna LZMA |
1010510a | 106 | Group: Development/Libraries |
b8dda4f2 | 107 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
99e7eab7 AM |
108 | Provides: lzma-static = %{epoch}:%{version}-%{release} |
109 | Obsoletes: lzma-static < 1:4.999.6 | |
1010510a ER |
110 | |
111 | %description static | |
84d12552 JB |
112 | LZMA static library. |
113 | ||
fb275d27 | 114 | %description static -l pl.UTF-8 |
84d12552 | 115 | Biblioteka statyczna LZMA. |
1010510a | 116 | |
82d22baf | 117 | %prep |
42322a5b | 118 | %setup -q |
82d22baf | 119 | |
120 | %build | |
521b5888 ER |
121 | %configure \ |
122 | %{!?with_asm:--disable-assembler} | |
92626cfe | 123 | %{__make} |
90fc2073 | 124 | |
b7470431 AM |
125 | %{?with_tests:%{__make} check} |
126 | ||
82d22baf | 127 | %install |
128 | rm -rf $RPM_BUILD_ROOT | |
71b73044 | 129 | install -d $RPM_BUILD_ROOT/{etc/env.d,%{_lib}} |
82d22baf | 130 | |
92626cfe AM |
131 | %{__make} install \ |
132 | DESTDIR=$RPM_BUILD_ROOT | |
133 | ||
35e87229 | 134 | mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib} |
42322a5b | 135 | ln -sf /%{_lib}/liblzma.so.5.0.0 $RPM_BUILD_ROOT%{_libdir}/liblzma.so |
35e87229 | 136 | |
d73f94d2 | 137 | echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT |
71b73044 | 138 | |
590de190 | 139 | %find_lang %{name} |
82d22baf | 140 | |
141 | %clean | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
1010510a ER |
144 | %post libs -p /sbin/ldconfig |
145 | %postun libs -p /sbin/ldconfig | |
146 | ||
590de190 | 147 | %files -f %{name}.lang |
82d22baf | 148 | %defattr(644,root,root,755) |
d73f94d2 | 149 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT |
590de190 JB |
150 | %attr(755,root,root) %{_bindir}/lz* |
151 | %attr(755,root,root) %{_bindir}/unlzma | |
152 | %attr(755,root,root) %{_bindir}/unxz | |
153 | %attr(755,root,root) %{_bindir}/xz* | |
154 | %{_mandir}/man1/lz*.1* | |
155 | %{_mandir}/man1/unlzma.1* | |
156 | %{_mandir}/man1/unxz.1* | |
157 | %{_mandir}/man1/xz*.1* | |
158 | ||
159 | %files libs | |
92626cfe | 160 | %defattr(644,root,root,755) |
d73f94d2 | 161 | %doc AUTHORS COPYING README THANKS |
2e897a0c | 162 | %doc doc/*.txt |
35e87229 | 163 | %attr(755,root,root) /%{_lib}/liblzma.so.*.*.* |
42322a5b | 164 | %attr(755,root,root) %ghost /%{_lib}/liblzma.so.5 |
1010510a | 165 | |
92626cfe AM |
166 | %files devel |
167 | %defattr(644,root,root,755) | |
9acc8826 JB |
168 | %attr(755,root,root) %{_libdir}/liblzma.so |
169 | %{_libdir}/liblzma.la | |
170 | %{_includedir}/lzma.h | |
fbb952ac | 171 | %{_includedir}/lzma |
d73f94d2 | 172 | %{_pkgconfigdir}/liblzma.pc |
1010510a | 173 | |
92626cfe AM |
174 | %files static |
175 | %defattr(644,root,root,755) | |
9acc8826 | 176 | %{_libdir}/liblzma.a |