]> git.pld-linux.org Git - packages/xz.git/blob - xz.spec
- 4.49
[packages/xz.git] / xz.spec
1 Summary:        LZMA Encoder/Decoder
2 Summary(pl.UTF-8):      Koder/Dekoder LZMA
3 Name:           lzma
4 Version:        4.49
5 Release:        0.9
6 License:        CPL/LGPL
7 Group:          Applications/Archiving
8 Source0:        http://dl.sourceforge.net/sevenzip/%{name}449.tar.bz2
9 # Source0-md5:  410487fe9717ce5a37e3c810cee74092
10 Patch0:         %{name}-quiet.patch
11 Patch1:         %{name}427_zlib.patch
12 Patch2:         %{name}-shared.patch
13 Patch3:         %{name}-lzmalib.patch
14 URL:            http://www.7-zip.org/sdk.html
15 BuildRequires:  gcc >= 5:3.4.0
16 BuildRequires:  libstdc++-devel
17 # does not need -libs, due apps being not linked with shared lib
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 LZMA is default and general compression method of 7z format in 7-Zip
22 program. LZMA provides high compression ratio and very fast
23 decompression, so it is very suitable for embedded applications. For
24 example, it can be used for ROM (firmware) compressing.
25
26 LZMA features:
27
28 - Compressing speed: 500 KB/s on 1 GHz CPU
29 - Decompressing speed:
30   - 8-12 MB/s on 1 GHz Intel Pentium 3 or AMD Athlon.
31   - 500-1000 KB/s on 100 MHz ARM, MIPS, PowerPC or other simple RISC
32     CPU.
33 - Small memory requirements for decompressing: 8-32 KB + dictionary
34   size
35 - Small code size for decompressing: 2-8 KB (depending from speed
36   optimizations)
37
38 %description -l pl.UTF-8
39 LZMA jest domyślnym i ogólnym algorytmem kompresji formatu 7z
40 stosowanego przez 7-Zip. LZMA zapewnia wysoki stopień kompresji i
41 bardzo szybką dekompresję, więc nadaje się do zastosowań osadzonych.
42 Przykładowo, może być użyty do kompresji ROM-u (firmware'u).
43
44 Cechy LZMA:
45
46 - Szybkość kompresowania: 500 KB/s na 1 GHz procesorze,
47 - Szybkość dekompresowania:
48   - 8-12 MB/s na 1 GHz Pentium 3 lub Athlonie,
49   - 500-1000 KB/s na 100 MHz procesorach ARM, MIPS, PowerPC lub innych
50     prostych RISC-ach,
51 - Mała ilość pamięci potrzebna do dekompresowania: 8-32 KB + rozmiar
52   słownika,
53 - Mały rozmiar kodu dekompresującego: 2-8 KB (w zależności od opcji
54   optymalizacji).
55
56 %package libs
57 Summary:        LZMA shared library
58 Summary(pl.UTF-8):      Biblioteka współdzielona LZMA
59 Group:          Libraries
60
61 %description libs
62 LZMA shared library.
63
64 %description libs -l pl.UTF-8
65 Biblioteka współdzielona LZMA.
66
67 %package devel
68 Summary:        Header file for LZMA library
69 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki LZMA
70 Group:          Development/Libraries
71 Requires:       %{name}-libs = %{version}-%{release}
72
73 %description devel
74 Header file for LZMA library.
75
76 %description devel -l pl.UTF-8
77 Plik nagłówkowy biblioteki LZMA.
78
79 %package static
80 Summary:        LZMA static library
81 Summary(pl.UTF-8):      Biblioteka statyczna LZMA
82 Group:          Development/Libraries
83 Requires:       %{name}-devel = %{version}-%{release}
84
85 %description static
86 LZMA static library.
87
88 %description static -l pl.UTF-8
89 Biblioteka statyczna LZMA.
90
91 %prep
92 %setup -q -c
93 %patch0 -p1
94 #%patch1 -p1
95 #%patch2 -p1
96 #%patch3 -p1
97
98 %build
99 cd CPP/7zip/Compress/LZMA_Alone
100 %{__make} -f makefile.gcc \
101         CXX="%{__cxx}" \
102         CXX_C="%{__cc}" \
103         CFLAGS="%{rpmcflags} -fprofile-generate -c -I ../../.." \
104         LDFLAGS="%{rpmcflags} %{rpmldflags} -fprofile-generate" \
105         LIB="-lm -lgcov"
106
107 cat ../LZMA/* > test1
108 cat lzma *.o > test2
109 tar cf test3 ../../../../*
110 ./lzma e test1 test4
111 ./lzma e test2 test5
112 ./lzma e test3 test6
113 ./lzma d test4 test7
114 ./lzma d test5 test8
115 ./lzma d test6 test9
116 cmp test1 test7
117 cmp test2 test8
118 cmp test3 test9
119
120 %{__make} -f makefile.gcc clean
121
122 %{__make} -f makefile.gcc \
123         CXX="%{__cxx}" \
124         CXX_C="%{__cc}" \
125         CFLAGS="%{rpmcflags} -fprofile-use -c -I ../../.." \
126         LDFLAGS="%{rpmcflags} %{rpmldflags}"
127
128 #cd ../LZMA_Lib
129 #%{__make} -f makefile \
130 #       CXX="%{__cxx}" \
131 #       CFLAGS="%{rpmcflags} -c -fpic" \
132 #       LDFLAGS="%{rpmcflags} %{rpmldflags}"
133
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
138
139 install CPP/7zip/Compress/LZMA_Alone/lzma $RPM_BUILD_ROOT%{_bindir}
140 #install CPP/7zip/Compress/LZMA_Lib/lzmalib.h $RPM_BUILD_ROOT%{_includedir}
141 #install CPP/7zip/Compress/LZMA_Lib/liblzma.a $RPM_BUILD_ROOT%{_libdir}
142 #install CPP/7zip/Compress/LZMA_Lib/liblzma.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
143 #ln -s $(cd CPP/7zip/Compress/LZMA_Lib; echo liblzma.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/liblzma.so
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post   libs -p /sbin/ldconfig
149 %postun libs -p /sbin/ldconfig
150
151 %files
152 %defattr(644,root,root,755)
153 %doc history.txt lzma.txt
154 %attr(755,root,root) %{_bindir}/*
155
156 #%files libs
157 #%defattr(644,root,root,755)
158 #%attr(755,root,root) %{_libdir}/liblzma.so.*.*
159
160 #%files devel
161 #%defattr(644,root,root,755)
162 #%attr(755,root,root) %{_libdir}/liblzma.so
163 #%{_includedir}/lzmalib.h
164
165 #%files static
166 #%defattr(644,root,root,755)
167 #%{_libdir}/liblzma.a
This page took 0.372746 seconds and 3 git commands to generate.