]> git.pld-linux.org Git - packages/xz.git/blame_incremental - xz.spec
add static_libs bcond
[packages/xz.git] / xz.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # don't perform make check
4%bcond_without asm # ix86 asm optimizations
5%bcond_without static_libs # static library
6
7%ifnarch %{ix86}
8# Speed-optimized CRC64 using slicing-by-four algorithm. This uses only i386
9# instructions, but it is optimized for i686 and later (including e.g. Pentium
10# II/III/IV, Athlon XP, and Core 2).
11%undefine with_asm
12%endif
13
14%if "%{pld_release}" == "ac"
15%undefine with_asm
16%endif
17
18Summary: LZMA Encoder/Decoder
19Summary(pl.UTF-8): Koder/Dekoder LZMA
20Name: xz
21Version: 5.4.6
22Release: 1
23Epoch: 1
24License: LGPL v2.1+, helper scripts on GPL v2+
25Group: Applications/Archiving
26Source0: https://github.com/tukaani-project/xz/releases/download/v%{version}/%{name}-%{version}.tar.bz2
27# Source0-md5: 098549e685e27620f2fe2883b02c35f2
28Patch0: %{name}-parallel.patch
29Patch1: %{name}-memlimit.patch
30URL: https://tukaani.org/xz/
31%{?with_asm:BuildRequires: gcc >= 5:3.4}
32BuildRequires: rpm >= 4.4.9-56
33BuildRequires: rpmbuild(macros) >= 1.527
34Requires: %{name}-libs = %{epoch}:%{version}-%{release}
35Suggests: mktemp
36Provides: lzma = %{epoch}:%{version}-%{release}
37Obsoletes: lzma < 1:4.999.6
38Conflicts: rpm < 4.4.9
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42LZMA is default and general compression method of 7z format in 7-Zip
43program. LZMA provides high compression ratio and very fast
44decompression, so it is very suitable for embedded applications. For
45example, it can be used for ROM (firmware) compressing.
46
47LZMA features:
48
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
53 CPU.
54- Small memory requirements for decompressing: 8-32 KB + dictionary
55 size
56- Small code size for decompressing: 2-8 KB (depending from speed
57 optimizations)
58
59%description -l pl.UTF-8
60LZMA jest domyślnym i ogólnym algorytmem kompresji formatu 7z
61stosowanego przez 7-Zip. LZMA zapewnia wysoki stopień kompresji i
62bardzo szybką dekompresję, więc nadaje się do zastosowań osadzonych.
63Przykładowo, może być użyty do kompresji ROM-u (firmware'u).
64
65Cechy LZMA:
66
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
71 prostych RISC-ach,
72- Mała ilość pamięci potrzebna do dekompresowania: 8-32 KB + rozmiar
73 słownika,
74- Mały rozmiar kodu dekompresującego: 2-8 KB (w zależności od opcji
75 optymalizacji).
76
77%package libs
78Summary: LZMA shared library
79Summary(pl.UTF-8): Biblioteka współdzielona LZMA
80Group: Libraries
81Provides: lzma-libs = %{epoch}:%{version}-%{release}
82Obsoletes: lzma-libs < 1:4.999.6
83
84%description libs
85LZMA shared library.
86
87%description libs -l pl.UTF-8
88Biblioteka współdzielona LZMA.
89
90%package devel
91Summary: Header file for LZMA library
92Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA
93Group: Development/Libraries
94Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
95Provides: lzma-devel = %{epoch}:%{version}-%{release}
96Obsoletes: lzma-devel < 1:4.999.6
97
98%description devel
99Header file for LZMA library.
100
101%description devel -l pl.UTF-8
102Plik nagłówkowy biblioteki LZMA.
103
104%package static
105Summary: LZMA static library
106Summary(pl.UTF-8): Biblioteka statyczna LZMA
107Group: Development/Libraries
108Requires: %{name}-devel = %{epoch}:%{version}-%{release}
109Provides: lzma-static = %{epoch}:%{version}-%{release}
110Obsoletes: lzma-static < 1:4.999.6
111
112%description static
113LZMA static library.
114
115%description static -l pl.UTF-8
116Biblioteka statyczna LZMA.
117
118%prep
119%setup -q
120%patch0 -p1
121%patch1 -p1
122
123%build
124%configure \
125 %{!?with_asm:--disable-assembler} \
126 %{__enable_disable static_libs static}
127%{__make}
128
129%{?with_tests:%{__make} check}
130
131%install
132rm -rf $RPM_BUILD_ROOT
133install -d $RPM_BUILD_ROOT{/etc/env.d,/%{_lib}}
134
135%{__make} install \
136 DESTDIR=$RPM_BUILD_ROOT
137
138%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
139
140install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
141cp -a doc/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
142
143mv -f $RPM_BUILD_ROOT%{_libdir}/liblzma.so.* $RPM_BUILD_ROOT/%{_lib}
144ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/liblzma.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/liblzma.so
145
146echo '#XZ_OPT="--threads=2"' > $RPM_BUILD_ROOT/etc/env.d/XZ_OPT
147
148%find_lang %{name}
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%post libs -p /sbin/ldconfig
154%postun libs -p /sbin/ldconfig
155
156%files -f %{name}.lang
157%defattr(644,root,root,755)
158%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/XZ_OPT
159%attr(755,root,root) %{_bindir}/lz*
160%attr(755,root,root) %{_bindir}/unlzma
161%attr(755,root,root) %{_bindir}/unxz
162%attr(755,root,root) %{_bindir}/xz*
163%{_mandir}/man1/lz*.1*
164%{_mandir}/man1/unlzma.1*
165%{_mandir}/man1/unxz.1*
166%{_mandir}/man1/xz*.1*
167%lang(de) %{_mandir}/de/man1/lz*.1*
168%lang(de) %{_mandir}/de/man1/unlzma.1*
169%lang(de) %{_mandir}/de/man1/unxz.1*
170%lang(de) %{_mandir}/de/man1/xz*.1*
171%lang(fr) %{_mandir}/fr/man1/lz*.1*
172%lang(fr) %{_mandir}/fr/man1/unlzma.1*
173%lang(fr) %{_mandir}/fr/man1/unxz.1*
174%lang(fr) %{_mandir}/fr/man1/xz*.1*
175%lang(ko) %{_mandir}/ko/man1/lz*.1*
176%lang(ko) %{_mandir}/ko/man1/unlzma.1*
177%lang(ko) %{_mandir}/ko/man1/unxz.1*
178%lang(ko) %{_mandir}/ko/man1/xz*.1*
179%lang(pt_BR) %{_mandir}/pt_BR/man1/lz*.1*
180%lang(pt_BR) %{_mandir}/pt_BR/man1/unlzma.1*
181%lang(pt_BR) %{_mandir}/pt_BR/man1/unxz.1*
182%lang(pt_BR) %{_mandir}/pt_BR/man1/xz*.1*
183%lang(ro) %{_mandir}/ro/man1/lz*.1*
184%lang(ro) %{_mandir}/ro/man1/unlzma.1*
185%lang(ro) %{_mandir}/ro/man1/unxz.1*
186%lang(ro) %{_mandir}/ro/man1/xz*.1*
187%lang(uk) %{_mandir}/uk/man1/lz*.1*
188%lang(uk) %{_mandir}/uk/man1/unlzma.1*
189%lang(uk) %{_mandir}/uk/man1/unxz.1*
190%lang(uk) %{_mandir}/uk/man1/xz*.1*
191
192%files libs
193%defattr(644,root,root,755)
194%doc AUTHORS COPYING README THANKS
195%doc doc/*.txt
196%attr(755,root,root) /%{_lib}/liblzma.so.*.*.*
197%attr(755,root,root) %ghost /%{_lib}/liblzma.so.5
198
199%files devel
200%defattr(644,root,root,755)
201%attr(755,root,root) %{_libdir}/liblzma.so
202%{_libdir}/liblzma.la
203%{_includedir}/lzma.h
204%{_includedir}/lzma
205%{_pkgconfigdir}/liblzma.pc
206%{_examplesdir}/%{name}-%{version}
207
208%if %{with static_libs}
209%files static
210%defattr(644,root,root,755)
211%{_libdir}/liblzma.a
212%endif
This page took 0.027472 seconds and 4 git commands to generate.