]> git.pld-linux.org Git - SPECS.git/blob - lzma-sdk.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / lzma-sdk.spec
1 Summary:        LZMA Encoder/Decoder
2 Summary(pl.UTF-8):      Koder/Dekoder LZMA
3 Name:           lzma-sdk
4 Version:        19.00
5 %define fver    %(echo %{version} | tr -d .)
6 Release:        1
7 License:        Public Domain
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
14 BuildRequires:  p7zip
15 # does not need -libs, due apps being not linked with shared lib
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
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 
22 decompressing.
23
24 LZMA features:
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
30   size
31 - small code size for decompressing: 5-8 kB
32
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.
37
38 Cechy LZMA:
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
44   słownika,
45 - mały rozmiar kodu dekompresującego: 5-8 kB
46
47 %package libs
48 Summary:        LZMA SDK shared library
49 Summary(pl.UTF-8):      Biblioteka współdzielona LZMA SDK
50 Group:          Libraries
51
52 %description libs
53 LZMA SDK shared library.
54
55 %description libs -l pl.UTF-8
56 Biblioteka współdzielona LZMA SDK.
57
58 %package devel
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}
63
64 %description devel
65 Header file for LZMA SDK library.
66
67 %description devel -l pl.UTF-8
68 Plik nagłówkowy biblioteki LZMA SDK.
69
70 %package static
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}
75
76 %description static
77 LZMA SDK static library.
78
79 %description static -l pl.UTF-8
80 Biblioteka statyczna LZMA SDK.
81
82 %prep
83 %setup -q -c
84
85 %build
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
89 done
90 libtool --tag CC --mode=link %{__cc} -o liblzmasdk.la %{rpmldflags} %{rpmcflags} *.lo -rpath %{_libdir}
91
92 %{__make} -C C/Util/7z -f makefile.gcc \
93         CXX="%{__cc}" \
94         CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -c" \
95         LDFLAGS="%{rpmldflags}"
96
97 %{__make} -C C/Util/Lzma -f makefile.gcc  \
98         CXX="%{__cc}" \
99         CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -D_7ZIP_ST -c" \
100         LDFLAGS="%{rpmldflags}"
101
102 %{__make} -C CPP/7zip/Bundles/LzmaCon -f makefile.gcc \
103         CXX="%{__cxx}" \
104         CXX_C="%{__cc}" \
105         CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -D_7ZIP_ST -c" \
106         LDFLAGS="%{rpmldflags}"
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/lzma-sdk,%{_libdir}}
111
112 libtool --mode=install install liblzmasdk.la $RPM_BUILD_ROOT%{_libdir}
113 # no external dependencies
114 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblzmasdk.la
115
116 cp -p C/{7zTypes,LzmaLib}.h $RPM_BUILD_ROOT%{_includedir}/lzma-sdk
117
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
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post   libs -p /sbin/ldconfig
126 %postun libs -p /sbin/ldconfig
127
128 %files
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
134
135 %files libs
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_libdir}/liblzmasdk.so.*.*.*
138 %attr(755,root,root) %ghost %{_libdir}/liblzmasdk.so.0
139
140 %files devel
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_libdir}/liblzmasdk.so
143 %{_includedir}/lzma-sdk
144
145 %files static
146 %defattr(644,root,root,755)
147 %{_libdir}/liblzmasdk.a
This page took 0.296702 seconds and 3 git commands to generate.