]> git.pld-linux.org Git - packages/xz.git/blob - xz.spec
up to 5.2.6 (fixes CVE-2022-1271)
[packages/xz.git] / xz.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # don't perform make check
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
12
13 %if "%{pld_release}" == "ac"
14 %undefine       with_asm
15 %endif
16
17 Summary:        LZMA Encoder/Decoder
18 Summary(pl.UTF-8):      Koder/Dekoder LZMA
19 Name:           xz
20 Version:        5.2.6
21 Release:        1
22 Epoch:          1
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 URL:            https://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 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
34 Suggests:       mktemp
35 Provides:       lzma = %{epoch}:%{version}-%{release}
36 Obsoletes:      lzma < 1:4.999.6
37 Conflicts:      rpm < 4.4.9
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
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.
53 - Small memory requirements for decompressing: 8-32 KB + dictionary
54   size
55 - Small code size for decompressing: 2-8 KB (depending from speed
56   optimizations)
57
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).
63
64 Cechy LZMA:
65
66 - Szybkość kompresowania: 500 KB/s na 1 GHz procesorze,
67 - Szybkość dekompresowania:
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,
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
74   optymalizacji).
75
76 %package libs
77 Summary:        LZMA shared library
78 Summary(pl.UTF-8):      Biblioteka współdzielona LZMA
79 Group:          Libraries
80 Provides:       lzma-libs = %{epoch}:%{version}-%{release}
81 Obsoletes:      lzma-libs < 1:4.999.6
82
83 %description libs
84 LZMA shared library.
85
86 %description libs -l pl.UTF-8
87 Biblioteka współdzielona LZMA.
88
89 %package devel
90 Summary:        Header file for LZMA library
91 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki LZMA
92 Group:          Development/Libraries
93 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
94 Provides:       lzma-devel = %{epoch}:%{version}-%{release}
95 Obsoletes:      lzma-devel < 1:4.999.6
96
97 %description devel
98 Header file for LZMA library.
99
100 %description devel -l pl.UTF-8
101 Plik nagłówkowy biblioteki LZMA.
102
103 %package static
104 Summary:        LZMA static library
105 Summary(pl.UTF-8):      Biblioteka statyczna LZMA
106 Group:          Development/Libraries
107 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
108 Provides:       lzma-static = %{epoch}:%{version}-%{release}
109 Obsoletes:      lzma-static < 1:4.999.6
110
111 %description static
112 LZMA static library.
113
114 %description static -l pl.UTF-8
115 Biblioteka statyczna LZMA.
116
117 %prep
118 %setup -q
119 %patch0 -p1
120 %patch1 -p1
121
122 %build
123 %configure \
124         %{!?with_asm:--disable-assembler}
125 %{__make}
126
127 %{?with_tests:%{__make} check}
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT{/etc/env.d,/%{_lib}}
132 %{__make} install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
136
137 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
138 cp -a doc/examples*  $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139
140 mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib}
141 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/liblzma.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/liblzma.so
142
143 mv $RPM_BUILD_ROOT%{_mandir}/fr{_FR,}
144
145 echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT
146
147 %find_lang %{name}
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %post   libs -p /sbin/ldconfig
153 %postun libs -p /sbin/ldconfig
154
155 %files -f %{name}.lang
156 %defattr(644,root,root,755)
157 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT
158 %attr(755,root,root) %{_bindir}/lz*
159 %attr(755,root,root) %{_bindir}/unlzma
160 %attr(755,root,root) %{_bindir}/unxz
161 %attr(755,root,root) %{_bindir}/xz*
162 %{_mandir}/man1/lz*.1*
163 %{_mandir}/man1/unlzma.1*
164 %{_mandir}/man1/unxz.1*
165 %{_mandir}/man1/xz*.1*
166 %lang(de) %{_mandir}/de/man1/lz*.1*
167 %lang(de) %{_mandir}/de/man1/unlzma.1*
168 %lang(de) %{_mandir}/de/man1/unxz.1*
169 %lang(de) %{_mandir}/de/man1/xz*.1*
170 %lang(fr) %{_mandir}/fr/man1/lz*.1*
171 %lang(fr) %{_mandir}/fr/man1/unlzma.1*
172 %lang(fr) %{_mandir}/fr/man1/unxz.1*
173 %lang(fr) %{_mandir}/fr/man1/xz*.1*
174
175 %files libs
176 %defattr(644,root,root,755)
177 %doc AUTHORS COPYING README THANKS
178 %doc doc/*.txt
179 %attr(755,root,root) /%{_lib}/liblzma.so.*.*.*
180 %attr(755,root,root) %ghost /%{_lib}/liblzma.so.5
181
182 %files devel
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/liblzma.so
185 %{_libdir}/liblzma.la
186 %{_includedir}/lzma.h
187 %{_includedir}/lzma
188 %{_pkgconfigdir}/liblzma.pc
189 %{_examplesdir}/%{name}-%{version}
190
191 %files static
192 %defattr(644,root,root,755)
193 %{_libdir}/liblzma.a
This page took 0.091013 seconds and 3 git commands to generate.