]>
Commit | Line | Data |
---|---|---|
a86b8374 ER |
1 | # |
2 | # Conditional build: | |
bf18a0ad | 3 | %bcond_without qt4 # Qt 4 version |
44bf8443 | 4 | %bcond_without qt5 # Qt 5 version |
e60fda55 | 5 | %bcond_without qt6 # Qt 6 version |
bf18a0ad | 6 | %bcond_without static_libs # static libraries |
a86b8374 | 7 | |
4b244daf | 8 | Summary: Qt/C++ wrapper for the minizip library |
44bf8443 | 9 | Summary(pl.UTF-8): Obudowanie Qt/C++ do biblioteki minizip |
4b244daf | 10 | Name: quazip |
c4de7c2b | 11 | Version: 1.4 |
f391b2ef | 12 | Release: 1 |
44bf8443 | 13 | License: GPL v2+ or LGPL v2+ |
4b244daf | 14 | Group: X11/Libraries |
2f072092 | 15 | #Source0Download: https://github.com/stachenov/quazip/releases |
f391b2ef | 16 | Source0: https://github.com/stachenov/quazip/archive/v%{version}/%{name}-%{version}.tar.gz |
c4de7c2b | 17 | # Source0-md5: f861638a19acaece2aaea11f7ec3b812 |
f391b2ef BS |
18 | Patch0: cmake.patch |
19 | URL: https://stachenov.github.io/quazip/ | |
c4de7c2b | 20 | BuildRequires: bzip2-devel |
f391b2ef | 21 | BuildRequires: cmake >= 3.15 |
4b244daf ER |
22 | BuildRequires: doxygen |
23 | BuildRequires: graphviz | |
c4de7c2b JB |
24 | %if %{with qt6} |
25 | BuildRequires: libstdc++-devel >= 6:7 | |
26 | %else | |
bf18a0ad | 27 | BuildRequires: libstdc++-devel >= 6:5 |
c4de7c2b | 28 | %endif |
2f072092 | 29 | BuildRequires: rpm-build >= 4.6 |
44bf8443 | 30 | BuildRequires: zlib-devel |
a86b8374 | 31 | %if %{with qt4} |
44bf8443 JB |
32 | BuildRequires: QtCore-devel >= 4.5.0 |
33 | BuildRequires: qt4-build >= 4.5.0 | |
34 | BuildRequires: qt4-qmake >= 4.5.0 | |
a86b8374 ER |
35 | %endif |
36 | %if %{with qt5} | |
44bf8443 JB |
37 | BuildRequires: Qt5Core-devel >= 5 |
38 | BuildRequires: qt5-build >= 5 | |
39 | BuildRequires: qt5-qmake >= 5 | |
a86b8374 | 40 | %endif |
e60fda55 JB |
41 | %if %{with qt6} |
42 | BuildRequires: Qt6Core-devel >= 6 | |
43 | BuildRequires: Qt6Qt5Compat-devel >= 6 | |
44 | BuildRequires: qt6-build >= 6 | |
45 | BuildRequires: qt6-qmake >= 6 | |
46 | %endif | |
4b244daf ER |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %description | |
50 | QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package | |
51 | that can be used to access ZIP archives. It uses Trolltech's Qt | |
52 | toolkit. | |
53 | ||
54 | QuaZIP allows you to access files inside ZIP archives using QIODevice | |
55 | API, and - yes! - that means that you can also use QTextStream, | |
56 | QDataStream or whatever you would like to use on your zipped files. | |
57 | ||
58 | QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both | |
59 | reading from and writing to ZIP archives. | |
60 | ||
44bf8443 JB |
61 | %description -l pl.UTF-8 |
62 | QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa | |
63 | Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP | |
64 | wykorzystuje bibliotekę narzędziową Qt firmy Trolltech. | |
65 | ||
66 | QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu | |
67 | API QIODevice, co oznacza, że można używać QTextStream, QDataStream, | |
68 | jak i innych na zzipowanych plikach. | |
69 | ||
70 | QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu, | |
71 | jak i zapisu plikówZIP. | |
72 | ||
aec7796f JB |
73 | %package qt4 |
74 | Summary: Qt 4/C++ wrapper for the minizip library | |
75 | Summary(pl.UTF-8): Obudowanie Qt 4/C++ do biblioteki minizip | |
76 | Group: X11/Libraries | |
77 | Requires: QtCore >= 4.5.0 | |
78 | Provides: quazip = %{version}-%{release} | |
79 | Obsoletes: quazip < 1.3 | |
80 | ||
81 | %description qt4 | |
82 | QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package | |
83 | that can be used to access ZIP archives. It uses Trolltech's Qt | |
84 | toolkit. | |
85 | ||
86 | QuaZIP allows you to access files inside ZIP archives using QIODevice | |
87 | API, and - yes! - that means that you can also use QTextStream, | |
88 | QDataStream or whatever you would like to use on your zipped files. | |
89 | ||
90 | QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both | |
91 | reading from and writing to ZIP archives. | |
92 | ||
93 | %description qt4 -l pl.UTF-8 | |
94 | QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa | |
95 | Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP | |
96 | wykorzystuje bibliotekę narzędziową Qt firmy Trolltech. | |
97 | ||
98 | QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu | |
99 | API QIODevice, co oznacza, że można używać QTextStream, QDataStream, | |
100 | jak i innych na zzipowanych plikach. | |
101 | ||
102 | QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu, | |
103 | jak i zapisu plikówZIP. | |
104 | ||
105 | %package qt4-devel | |
44bf8443 JB |
106 | Summary: Development files for QuaZIP (Qt 4 version) |
107 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 4) | |
4b244daf | 108 | Group: Development/Libraries |
aec7796f | 109 | Requires: %{name}-qt4 = %{version}-%{release} |
44bf8443 | 110 | Requires: QtCore-devel >= 4.5.0 |
bf18a0ad | 111 | Requires: zlib-devel |
aec7796f JB |
112 | Provides: quazip-devel = %{version}-%{release} |
113 | Obsoletes: quazip-devel < 1.3 | |
4b244daf | 114 | |
aec7796f | 115 | %description qt4-devel |
44bf8443 JB |
116 | This package contains the header files and documentation for |
117 | developing applications that use QuaZIP with Qt 4. | |
118 | ||
aec7796f | 119 | %description qt4-devel -l pl.UTF-8 |
44bf8443 JB |
120 | Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia |
121 | aplikacji wykorzystujących QuaZIP wraz z Qt 4. | |
4b244daf | 122 | |
aec7796f | 123 | %package qt4-static |
b9362d02 JB |
124 | Summary: Static QuaZIP library (Qt 4 version) |
125 | Summary(pl.UTF-8): Statyczna biblioteka QuaZIP (wersja dla Qt 4) | |
126 | Group: Development/Libraries | |
aec7796f JB |
127 | Requires: %{name}-qt4-devel = %{version}-%{release} |
128 | Provides: quazip-static = %{version}-%{release} | |
129 | Obsoletes: quazip-static < 1.3 | |
b9362d02 | 130 | |
aec7796f | 131 | %description qt4-static |
b9362d02 JB |
132 | Static QuaZIP library (Qt 4 version). |
133 | ||
aec7796f | 134 | %description qt4-static -l pl.UTF-8 |
b9362d02 JB |
135 | Statyczna biblioteka QuaZIP (wersja dla Qt 4). |
136 | ||
4b244daf | 137 | %package qt5 |
44bf8443 JB |
138 | Summary: Qt 5/C++ wrapper for the minizip library |
139 | Summary(pl.UTF-8): Obudowanie Qt 5/C++ do biblioteki minizip | |
4b244daf ER |
140 | Group: X11/Libraries |
141 | ||
142 | %description qt5 | |
143 | QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package | |
144 | that can be used to access ZIP archives. It uses Trolltech's Qt | |
145 | toolkit. | |
146 | ||
147 | QuaZIP allows you to access files inside ZIP archives using QIODevice | |
148 | API, and - yes! - that means that you can also use QTextStream, | |
149 | QDataStream or whatever you would like to use on your zipped files. | |
150 | ||
151 | QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both | |
152 | reading from and writing to ZIP archives. | |
153 | ||
44bf8443 JB |
154 | %description qt5 -l pl.UTF-8 |
155 | QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa | |
156 | Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP | |
157 | wykorzystuje bibliotekę narzędziową Qt firmy Trolltech. | |
158 | ||
159 | QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu | |
160 | API QIODevice, co oznacza, że można używać QTextStream, QDataStream, | |
161 | jak i innych na zzipowanych plikach. | |
162 | ||
163 | QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu, | |
164 | jak i zapisu plikówZIP. | |
165 | ||
4b244daf | 166 | %package qt5-devel |
44bf8443 JB |
167 | Summary: Development files for QuaZIP (Qt 5 version) |
168 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 5) | |
4b244daf ER |
169 | Group: Development/Libraries |
170 | Requires: %{name}-qt5 = %{version}-%{release} | |
44bf8443 | 171 | Requires: Qt5Core-devel >= 5 |
bf18a0ad | 172 | Requires: zlib-devel |
4b244daf ER |
173 | |
174 | %description qt5-devel | |
44bf8443 JB |
175 | This package contains the header files and documentation for |
176 | developing applications that use QuaZIP with Qt 5. | |
177 | ||
178 | %description qt5-devel -l pl.UTF-8 | |
179 | Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia | |
180 | aplikacji wykorzystujących QuaZIP wraz z Qt 5. | |
4b244daf | 181 | |
b9362d02 JB |
182 | %package qt5-static |
183 | Summary: Static QuaZIP library (Qt 5 version) | |
184 | Summary(pl.UTF-8): Statyczna biblioteka QuaZIP (wersja dla Qt 5) | |
185 | Group: Development/Libraries | |
186 | Requires: %{name}-qt5-devel = %{version}-%{release} | |
187 | ||
188 | %description qt5-static | |
189 | Static QuaZIP library (Qt 5 version). | |
190 | ||
191 | %description qt5-static -l pl.UTF-8 | |
192 | Statyczna biblioteka QuaZIP (wersja dla Qt 5). | |
193 | ||
e60fda55 JB |
194 | %package qt6 |
195 | Summary: Qt 6/C++ wrapper for the minizip library | |
196 | Summary(pl.UTF-8): Obudowanie Qt 6/C++ do biblioteki minizip | |
197 | Group: X11/Libraries | |
198 | ||
199 | %description qt6 | |
200 | QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package | |
201 | that can be used to access ZIP archives. It uses Trolltech's Qt | |
202 | toolkit. | |
203 | ||
204 | QuaZIP allows you to access files inside ZIP archives using QIODevice | |
205 | API, and - yes! - that means that you can also use QTextStream, | |
206 | QDataStream or whatever you would like to use on your zipped files. | |
207 | ||
208 | QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both | |
209 | reading from and writing to ZIP archives. | |
210 | ||
211 | %description qt6 -l pl.UTF-8 | |
212 | QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa | |
213 | Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP | |
214 | wykorzystuje bibliotekę narzędziową Qt firmy Trolltech. | |
215 | ||
216 | QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu | |
217 | API QIODevice, co oznacza, że można używać QTextStream, QDataStream, | |
218 | jak i innych na zzipowanych plikach. | |
219 | ||
220 | QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu, | |
221 | jak i zapisu plikówZIP. | |
222 | ||
223 | %package qt6-devel | |
224 | Summary: Development files for QuaZIP (Qt 6 version) | |
225 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 6) | |
226 | Group: Development/Libraries | |
227 | Requires: %{name}-qt6 = %{version}-%{release} | |
228 | Requires: Qt6Core-devel >= 6 | |
229 | Requires: zlib-devel | |
230 | ||
231 | %description qt6-devel | |
232 | This package contains the header files and documentation for | |
233 | developing applications that use QuaZIP with Qt 6. | |
234 | ||
235 | %description qt6-devel -l pl.UTF-8 | |
236 | Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia | |
237 | aplikacji wykorzystujących QuaZIP wraz z Qt 56 | |
238 | ||
239 | %package qt6-static | |
240 | Summary: Static QuaZIP library (Qt 6 version) | |
241 | Summary(pl.UTF-8): Statyczna biblioteka QuaZIP (wersja dla Qt 6) | |
242 | Group: Development/Libraries | |
243 | Requires: %{name}-qt6-devel = %{version}-%{release} | |
244 | ||
245 | %description qt6-static | |
246 | Static QuaZIP library (Qt 6 version). | |
247 | ||
248 | %description qt6-static -l pl.UTF-8 | |
249 | Statyczna biblioteka QuaZIP (wersja dla Qt 6). | |
250 | ||
2f072092 JB |
251 | %package apidocs |
252 | Summary: API documentation for QuaZIP libraries | |
253 | Summary(pl.UTF-8): Dokumentacja API bibliotek QuaZIP | |
254 | Group: Documentation | |
255 | BuildArch: noarch | |
256 | ||
257 | %description apidocs | |
258 | API documentation for QuaZIP libraries. | |
259 | ||
260 | %description apidocs -l pl.UTF-8 | |
261 | Dokumentacja API bibliotek QuaZIP. | |
262 | ||
4b244daf ER |
263 | %prep |
264 | %setup -q | |
f391b2ef | 265 | %patch0 -p1 |
4b244daf ER |
266 | |
267 | %build | |
fbdd6635 | 268 | export CXXFLAGS="%{rpmcxxflags} -fPIC" |
bf18a0ad JB |
269 | %if %{with qt4} |
270 | %cmake -B build-qt4 \ | |
271 | -DQUAZIP_QT_MAJOR_VERSION=4 | |
272 | ||
273 | %{__make} -C build-qt4 | |
274 | ||
275 | %if %{with static_libs} | |
276 | %cmake -B build-qt4-static \ | |
277 | -DBUILD_SHARED_LIBS=OFF \ | |
278 | -DQUAZIP_QT_MAJOR_VERSION=4 | |
279 | ||
280 | %{__make} -C build-qt4-static | |
281 | %endif | |
a86b8374 | 282 | %endif |
4b244daf | 283 | |
371fbe8a | 284 | %if %{with qt5} |
bf18a0ad JB |
285 | %cmake -B build-qt5 \ |
286 | -DQUAZIP_QT_MAJOR_VERSION=5 | |
287 | ||
288 | %{__make} -C build-qt5 | |
289 | ||
290 | %if %{with static_libs} | |
291 | %cmake -B build-qt5-static \ | |
292 | -DBUILD_SHARED_LIBS=OFF \ | |
293 | -DQUAZIP_QT_MAJOR_VERSION=5 | |
294 | ||
295 | %{__make} -C build-qt5-static | |
296 | %endif | |
a86b8374 | 297 | %endif |
4b244daf | 298 | |
e60fda55 JB |
299 | %if %{with qt6} |
300 | %cmake -B build-qt6 \ | |
301 | -DQUAZIP_QT_MAJOR_VERSION=6 | |
302 | ||
303 | %{__make} -C build-qt6 | |
304 | ||
305 | %if %{with static_libs} | |
306 | %cmake -B build-qt6-static \ | |
307 | -DBUILD_SHARED_LIBS=OFF \ | |
308 | -DQUAZIP_QT_MAJOR_VERSION=6 | |
309 | ||
310 | %{__make} -C build-qt6-static | |
311 | %endif | |
312 | %endif | |
313 | ||
4b244daf ER |
314 | doxygen Doxyfile |
315 | for file in doc/html/*; do | |
316 | touch -r Doxyfile $file | |
317 | done | |
318 | ||
319 | %install | |
320 | rm -rf $RPM_BUILD_ROOT | |
bf18a0ad | 321 | |
a86b8374 | 322 | %if %{with qt4} |
371fbe8a | 323 | %{__make} -C build-qt4 install/fast \ |
4b244daf | 324 | DESTDIR=$RPM_BUILD_ROOT |
bf18a0ad JB |
325 | |
326 | %if %{with static_libs} | |
327 | %{__make} -C build-qt4-static install/fast \ | |
328 | DESTDIR=$RPM_BUILD_ROOT | |
a86b8374 | 329 | %endif |
bf18a0ad JB |
330 | %endif |
331 | ||
a86b8374 | 332 | %if %{with qt5} |
371fbe8a | 333 | %{__make} -C build-qt5 install/fast \ |
4b244daf | 334 | DESTDIR=$RPM_BUILD_ROOT |
bf18a0ad JB |
335 | |
336 | %if %{with static_libs} | |
337 | %{__make} -C build-qt5-static install/fast \ | |
338 | DESTDIR=$RPM_BUILD_ROOT | |
339 | %endif | |
a86b8374 | 340 | %endif |
4b244daf | 341 | |
e60fda55 JB |
342 | %if %{with qt6} |
343 | %{__make} -C build-qt6 install/fast \ | |
344 | DESTDIR=$RPM_BUILD_ROOT | |
345 | ||
346 | %if %{with static_libs} | |
347 | %{__make} -C build-qt6-static install/fast \ | |
348 | DESTDIR=$RPM_BUILD_ROOT | |
349 | %endif | |
350 | %endif | |
351 | ||
4b244daf ER |
352 | %clean |
353 | rm -rf $RPM_BUILD_ROOT | |
354 | ||
aec7796f JB |
355 | %post qt4 -p /sbin/ldconfig |
356 | %postun qt4 -p /sbin/ldconfig | |
4b244daf | 357 | |
a86b8374 ER |
358 | %post qt5 -p /sbin/ldconfig |
359 | %postun qt5 -p /sbin/ldconfig | |
360 | ||
e60fda55 JB |
361 | %post qt6 -p /sbin/ldconfig |
362 | %postun qt6 -p /sbin/ldconfig | |
363 | ||
a86b8374 | 364 | %if %{with qt4} |
aec7796f | 365 | %files qt4 |
4b244daf | 366 | %defattr(644,root,root,755) |
f391b2ef BS |
367 | %doc COPYING NEWS.txt README.md |
368 | %attr(755,root,root) %{_libdir}/libquazip1-qt4.so.*.*.* | |
c4de7c2b | 369 | %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt4.so.1.4 |
4b244daf | 370 | |
aec7796f | 371 | %files qt4-devel |
4b244daf | 372 | %defattr(644,root,root,755) |
f391b2ef | 373 | %attr(755,root,root) %{_libdir}/libquazip1-qt4.so |
c4de7c2b JB |
374 | %{_includedir}/QuaZip-Qt4-1.4 |
375 | %{_libdir}/cmake/QuaZip-Qt4-1.4 | |
f391b2ef | 376 | %{_pkgconfigdir}/quazip1-qt4.pc |
b9362d02 | 377 | |
bf18a0ad | 378 | %if %{with static_libs} |
aec7796f | 379 | %files qt4-static |
b9362d02 | 380 | %defattr(644,root,root,755) |
bf18a0ad JB |
381 | %{_libdir}/libquazip1-qt4.a |
382 | %endif | |
a86b8374 | 383 | %endif |
4b244daf | 384 | |
371fbe8a | 385 | %if %{with qt5} |
4b244daf ER |
386 | %files qt5 |
387 | %defattr(644,root,root,755) | |
f391b2ef BS |
388 | %doc COPYING NEWS.txt README.md |
389 | %attr(755,root,root) %{_libdir}/libquazip1-qt5.so.*.*.* | |
c4de7c2b | 390 | %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt5.so.1.4 |
4b244daf ER |
391 | |
392 | %files qt5-devel | |
393 | %defattr(644,root,root,755) | |
f391b2ef | 394 | %attr(755,root,root) %{_libdir}/libquazip1-qt5.so |
c4de7c2b JB |
395 | %{_includedir}/QuaZip-Qt5-1.4 |
396 | %{_libdir}/cmake/QuaZip-Qt5-1.4 | |
f391b2ef | 397 | %{_pkgconfigdir}/quazip1-qt5.pc |
b9362d02 | 398 | |
bf18a0ad | 399 | %if %{with static_libs} |
b9362d02 JB |
400 | %files qt5-static |
401 | %defattr(644,root,root,755) | |
bf18a0ad | 402 | %{_libdir}/libquazip1-qt5.a |
a86b8374 | 403 | %endif |
f391b2ef | 404 | %endif |
2f072092 | 405 | |
e60fda55 JB |
406 | %if %{with qt6} |
407 | %files qt6 | |
408 | %defattr(644,root,root,755) | |
409 | %doc COPYING NEWS.txt README.md | |
410 | %attr(755,root,root) %{_libdir}/libquazip1-qt6.so.*.*.* | |
c4de7c2b | 411 | %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt6.so.1.4 |
e60fda55 JB |
412 | |
413 | %files qt6-devel | |
414 | %defattr(644,root,root,755) | |
415 | %attr(755,root,root) %{_libdir}/libquazip1-qt6.so | |
c4de7c2b JB |
416 | %{_includedir}/QuaZip-Qt6-1.4 |
417 | %{_libdir}/cmake/QuaZip-Qt6-1.4 | |
e60fda55 JB |
418 | %{_pkgconfigdir}/quazip1-qt6.pc |
419 | ||
420 | %if %{with static_libs} | |
421 | %files qt6-static | |
422 | %defattr(644,root,root,755) | |
423 | %{_libdir}/libquazip1-qt6.a | |
424 | %endif | |
425 | %endif | |
426 | ||
2f072092 JB |
427 | %files apidocs |
428 | %defattr(644,root,root,755) | |
429 | %doc doc/html/*.{css,html,js,png} |