1 Summary: LZMA Encoder/Decoder
2 Summary(pl.UTF-8): Koder/Dekoder LZMA
5 %define fver %(echo %{version} | tr -d .)
8 Group: Applications/Archiving
9 Source0: https://www.7-zip.org/a/lzma%{fver}.7z
10 # Source0-md5: 9d0411963b9d604a73833e1cc8289522
11 URL: https://www.7-zip.org/sdk.html
12 BuildRequires: libstdc++-devel
13 BuildRequires: libtool
15 # does not need -libs, due apps being not linked with shared lib
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 LZMA is an improved version of famous LZ77 compression algorithm. It
20 was improved in way of maximum increasing of compression ratio,
21 keeping high decompression speed and low memory requirements for
25 - compressing speed: ~2MB/s on 2 GHz CPU
26 - decompressing speed:
27 - 20-30 MB/s on modern 2 GHz CPU
28 - 1-2 MB/s on 200 MHz simple RISC CPU (ARM, MIPS, PowerPC)
29 - small memory requirements for decompressing: 16 kB + dictionary
31 - small code size for decompressing: 5-8 kB
33 %description -l pl.UTF-8
34 LZMA to ulepszona wersja słynnego algorytmu kompresji LZ77. Został
35 poprawiony, aby maksymalnie zwiększyć stopień kompresji, utrzymując
36 wysoką szybkość i małe wymagania pamięciowe dekompresji.
39 - szybkość kompresowania: ~2MB/s na 2 GHz procesorze,
40 - szybkość dekompresowania:
41 - 20-30 MB/s na współczesnym 2 GHz procesorze,
42 - 1-2 MB/s na prostym procesorze RISC 200 MHz (ARM, MIPS, PowerPC)
43 - mała ilość pamięci potrzebna do dekompresowania: 16 kB + rozmiar
45 - mały rozmiar kodu dekompresującego: 5-8 kB
48 Summary: LZMA SDK shared library
49 Summary(pl.UTF-8): Biblioteka współdzielona LZMA SDK
53 LZMA SDK shared library.
55 %description libs -l pl.UTF-8
56 Biblioteka współdzielona LZMA SDK.
59 Summary: Header file for LZMA SDK library
60 Summary(pl.UTF-8): Plik nagłówkowy biblioteki LZMA SDK
61 Group: Development/Libraries
62 Requires: %{name}-libs = %{version}-%{release}
65 Header file for LZMA SDK library.
67 %description devel -l pl.UTF-8
68 Plik nagłówkowy biblioteki LZMA SDK.
71 Summary: LZMA SDK static library
72 Summary(pl.UTF-8): Biblioteka statyczna LZMA SDK
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
77 LZMA SDK static library.
79 %description static -l pl.UTF-8
80 Biblioteka statyczna LZMA SDK.
86 LIBFILES="Alloc LzFind LzmaDec LzmaEnc LzmaLib"
87 for f in $LIBFILES ; do
88 libtool --tag CC --mode=compile %{__cc} -o ${f}.lo %{rpmcflags} %{rpmcppflags} -D_7ZIP_ST -c C/${f}.c
90 libtool --tag CC --mode=link %{__cc} -o liblzmasdk.la %{rpmldflags} %{rpmcflags} *.lo -rpath %{_libdir}
92 %{__make} -C C/Util/7z -f makefile.gcc \
94 CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -c" \
95 LDFLAGS="%{rpmldflags}"
97 %{__make} -C C/Util/Lzma -f makefile.gcc \
99 CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -D_7ZIP_ST -c" \
100 LDFLAGS="%{rpmldflags}"
102 %{__make} -C CPP/7zip/Bundles/LzmaCon -f makefile.gcc \
105 CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -D_7ZIP_ST -c" \
106 LDFLAGS="%{rpmldflags}"
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/lzma-sdk,%{_libdir}}
112 libtool --mode=install install liblzmasdk.la $RPM_BUILD_ROOT%{_libdir}
113 # no external dependencies
114 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblzmasdk.la
116 cp -p C/{7zTypes,LzmaLib}.h $RPM_BUILD_ROOT%{_includedir}/lzma-sdk
118 cp -p C/Util/7z/7zDec $RPM_BUILD_ROOT%{_bindir}
119 cp -p C/Util/Lzma/lzma $RPM_BUILD_ROOT%{_bindir}/lzma-c
120 cp -p CPP/7zip/Bundles/LzmaCon/lzma $RPM_BUILD_ROOT%{_bindir}/lzma-cpp
123 rm -rf $RPM_BUILD_ROOT
125 %post libs -p /sbin/ldconfig
126 %postun libs -p /sbin/ldconfig
129 %defattr(644,root,root,755)
130 %doc DOC/{7zFormat,Methods,lzma,lzma-history,lzma-sdk,lzma-specification}.txt
131 %attr(755,root,root) %{_bindir}/7zDec
132 %attr(755,root,root) %{_bindir}/lzma-c
133 %attr(755,root,root) %{_bindir}/lzma-cpp
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_libdir}/liblzmasdk.so.*.*.*
138 %attr(755,root,root) %ghost %{_libdir}/liblzmasdk.so.0
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_libdir}/liblzmasdk.so
143 %{_includedir}/lzma-sdk
146 %defattr(644,root,root,755)
147 %{_libdir}/liblzmasdk.a