]> git.pld-linux.org Git - packages/quazip.git/blob - quazip.spec
c638a8b528be39f37de9098abe9d6db7c7a70dba
[packages/quazip.git] / quazip.spec
1 #
2 # Conditional build:
3 %bcond_without  qt4             # Qt 4 version
4 %bcond_without  qt5             # Qt 5 version
5 %bcond_without  qt6             # Qt 6 version
6 %bcond_without  static_libs     # static libraries
7
8 Summary:        Qt/C++ wrapper for the minizip library
9 Summary(pl.UTF-8):      Obudowanie Qt/C++ do biblioteki minizip
10 Name:           quazip
11 Version:        1.4
12 Release:        1
13 License:        GPL v2+ or LGPL v2+
14 Group:          X11/Libraries
15 #Source0Download: https://github.com/stachenov/quazip/releases
16 Source0:        https://github.com/stachenov/quazip/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  f861638a19acaece2aaea11f7ec3b812
18 Patch0:         cmake.patch
19 URL:            https://stachenov.github.io/quazip/
20 BuildRequires:  bzip2-devel
21 BuildRequires:  cmake >= 3.15
22 BuildRequires:  doxygen
23 BuildRequires:  graphviz
24 %if %{with qt6}
25 BuildRequires:  libstdc++-devel >= 6:7
26 %else
27 BuildRequires:  libstdc++-devel >= 6:5
28 %endif
29 BuildRequires:  rpm-build >= 4.6
30 BuildRequires:  zlib-devel
31 %if %{with qt4}
32 BuildRequires:  QtCore-devel >= 4.5.0
33 BuildRequires:  qt4-build >= 4.5.0
34 BuildRequires:  qt4-qmake >= 4.5.0
35 %endif
36 %if %{with qt5}
37 BuildRequires:  Qt5Core-devel >= 5
38 BuildRequires:  qt5-build >= 5
39 BuildRequires:  qt5-qmake >= 5
40 %endif
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
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
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
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
106 Summary:        Development files for QuaZIP (Qt 4 version)
107 Summary(pl.UTF-8):      Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 4)
108 Group:          Development/Libraries
109 Requires:       %{name}-qt4 = %{version}-%{release}
110 Requires:       QtCore-devel >= 4.5.0
111 Requires:       zlib-devel
112 Provides:       quazip-devel = %{version}-%{release}
113 Obsoletes:      quazip-devel < 1.3
114
115 %description qt4-devel
116 This package contains the header files and documentation for
117 developing applications that use QuaZIP with Qt 4.
118
119 %description qt4-devel -l pl.UTF-8
120 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia
121 aplikacji wykorzystujących QuaZIP wraz z Qt 4.
122
123 %package qt4-static
124 Summary:        Static QuaZIP library (Qt 4 version)
125 Summary(pl.UTF-8):      Statyczna biblioteka QuaZIP (wersja dla Qt 4)
126 Group:          Development/Libraries
127 Requires:       %{name}-qt4-devel = %{version}-%{release}
128 Provides:       quazip-static = %{version}-%{release}
129 Obsoletes:      quazip-static < 1.3
130
131 %description qt4-static
132 Static QuaZIP library (Qt 4 version).
133
134 %description qt4-static -l pl.UTF-8
135 Statyczna biblioteka QuaZIP (wersja dla Qt 4).
136
137 %package qt5
138 Summary:        Qt 5/C++ wrapper for the minizip library
139 Summary(pl.UTF-8):      Obudowanie Qt 5/C++ do biblioteki minizip
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
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
166 %package qt5-devel
167 Summary:        Development files for QuaZIP (Qt 5 version)
168 Summary(pl.UTF-8):      Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 5)
169 Group:          Development/Libraries
170 Requires:       %{name}-qt5 = %{version}-%{release}
171 Requires:       Qt5Core-devel >= 5
172 Requires:       zlib-devel
173
174 %description qt5-devel
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.
181
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
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
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
263 %prep
264 %setup -q
265 %patch0 -p1
266
267 %build
268 export CXXFLAGS="%{rpmcxxflags} -fPIC"
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
282 %endif
283
284 %if %{with qt5}
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
297 %endif
298
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
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
321
322 %if %{with qt4}
323 %{__make} -C build-qt4 install/fast \
324         DESTDIR=$RPM_BUILD_ROOT
325
326 %if %{with static_libs}
327 %{__make} -C build-qt4-static install/fast \
328         DESTDIR=$RPM_BUILD_ROOT
329 %endif
330 %endif
331
332 %if %{with qt5}
333 %{__make} -C build-qt5 install/fast \
334         DESTDIR=$RPM_BUILD_ROOT
335
336 %if %{with static_libs}
337 %{__make} -C build-qt5-static install/fast \
338         DESTDIR=$RPM_BUILD_ROOT
339 %endif
340 %endif
341
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
352 %clean
353 rm -rf $RPM_BUILD_ROOT
354
355 %post   qt4 -p /sbin/ldconfig
356 %postun qt4 -p /sbin/ldconfig
357
358 %post   qt5 -p /sbin/ldconfig
359 %postun qt5 -p /sbin/ldconfig
360
361 %post   qt6 -p /sbin/ldconfig
362 %postun qt6 -p /sbin/ldconfig
363
364 %if %{with qt4}
365 %files qt4
366 %defattr(644,root,root,755)
367 %doc COPYING NEWS.txt README.md
368 %attr(755,root,root) %{_libdir}/libquazip1-qt4.so.*.*.*
369 %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt4.so.1.4
370
371 %files qt4-devel
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/libquazip1-qt4.so
374 %{_includedir}/QuaZip-Qt4-1.4
375 %{_libdir}/cmake/QuaZip-Qt4-1.4
376 %{_pkgconfigdir}/quazip1-qt4.pc
377
378 %if %{with static_libs}
379 %files qt4-static
380 %defattr(644,root,root,755)
381 %{_libdir}/libquazip1-qt4.a
382 %endif
383 %endif
384
385 %if %{with qt5}
386 %files qt5
387 %defattr(644,root,root,755)
388 %doc COPYING NEWS.txt README.md
389 %attr(755,root,root) %{_libdir}/libquazip1-qt5.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt5.so.1.4
391
392 %files qt5-devel
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libquazip1-qt5.so
395 %{_includedir}/QuaZip-Qt5-1.4
396 %{_libdir}/cmake/QuaZip-Qt5-1.4
397 %{_pkgconfigdir}/quazip1-qt5.pc
398
399 %if %{with static_libs}
400 %files qt5-static
401 %defattr(644,root,root,755)
402 %{_libdir}/libquazip1-qt5.a
403 %endif
404 %endif
405
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.*.*.*
411 %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt6.so.1.4
412
413 %files qt6-devel
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/libquazip1-qt6.so
416 %{_includedir}/QuaZip-Qt6-1.4
417 %{_libdir}/cmake/QuaZip-Qt6-1.4
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
427 %files apidocs
428 %defattr(644,root,root,755)
429 %doc doc/html/*.{css,html,js,png}
This page took 0.060563 seconds and 2 git commands to generate.