]> git.pld-linux.org Git - packages/quazip.git/blob - quazip.spec
cca27443a501db6a2346a3bc282c07eb932781b5
[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  static_libs     # static libraries
6
7 Summary:        Qt/C++ wrapper for the minizip library
8 Summary(pl.UTF-8):      Obudowanie Qt/C++ do biblioteki minizip
9 Name:           quazip
10 Version:        1.3
11 Release:        1
12 License:        GPL v2+ or LGPL v2+
13 Group:          X11/Libraries
14 #Source0Download: https://github.com/stachenov/quazip/releases
15 Source0:        https://github.com/stachenov/quazip/archive/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  52b45020f8153a45920cd572d777c6a7
17 Patch0:         cmake.patch
18 URL:            https://stachenov.github.io/quazip/
19 BuildRequires:  cmake >= 3.15
20 BuildRequires:  doxygen
21 BuildRequires:  graphviz
22 BuildRequires:  libstdc++-devel >= 6:5
23 BuildRequires:  rpm-build >= 4.6
24 BuildRequires:  zlib-devel
25 %if %{with qt4}
26 BuildRequires:  QtCore-devel >= 4.5.0
27 BuildRequires:  qt4-build >= 4.5.0
28 BuildRequires:  qt4-qmake >= 4.5.0
29 %endif
30 %if %{with qt5}
31 BuildRequires:  Qt5Core-devel >= 5
32 BuildRequires:  qt5-build >= 5
33 BuildRequires:  qt5-qmake >= 5
34 %endif
35 Requires:       QtCore-devel >= 4.5.0
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package
40 that can be used to access ZIP archives. It uses Trolltech's Qt
41 toolkit.
42
43 QuaZIP allows you to access files inside ZIP archives using QIODevice
44 API, and - yes! - that means that you can also use QTextStream,
45 QDataStream or whatever you would like to use on your zipped files.
46
47 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
48 reading from and writing to ZIP archives.
49
50 %description -l pl.UTF-8
51 QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa
52 Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP
53 wykorzystuje bibliotekę narzędziową Qt firmy Trolltech.
54
55 QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu
56 API QIODevice, co oznacza, że można używać QTextStream, QDataStream,
57 jak i innych na zzipowanych plikach.
58
59 QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu,
60 jak i zapisu plikówZIP.
61
62 %package devel
63 Summary:        Development files for QuaZIP (Qt 4 version)
64 Summary(pl.UTF-8):      Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 4)
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       QtCore-devel >= 4.5.0
68 Requires:       zlib-devel
69
70 %description devel
71 This package contains the header files and documentation for
72 developing applications that use QuaZIP with Qt 4.
73
74 %description devel -l pl.UTF-8
75 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia
76 aplikacji wykorzystujących QuaZIP wraz z Qt 4.
77
78 %package static
79 Summary:        Static QuaZIP library (Qt 4 version)
80 Summary(pl.UTF-8):      Statyczna biblioteka QuaZIP (wersja dla Qt 4)
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static QuaZIP library (Qt 4 version).
86
87 %description static -l pl.UTF-8
88 Statyczna biblioteka QuaZIP (wersja dla Qt 4).
89
90 %package qt5
91 Summary:        Qt 5/C++ wrapper for the minizip library
92 Summary(pl.UTF-8):      Obudowanie Qt 5/C++ do biblioteki minizip
93 Group:          X11/Libraries
94
95 %description qt5
96 QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package
97 that can be used to access ZIP archives. It uses Trolltech's Qt
98 toolkit.
99
100 QuaZIP allows you to access files inside ZIP archives using QIODevice
101 API, and - yes! - that means that you can also use QTextStream,
102 QDataStream or whatever you would like to use on your zipped files.
103
104 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
105 reading from and writing to ZIP archives.
106
107 %description qt5 -l pl.UTF-8
108 QuaZIP to proste obudowanie C++ dla pakietu ZIP/UNZIP Gillesa
109 Vollanta, który może być używany do dostępu do archiwów ZIP. QuaZIP
110 wykorzystuje bibliotekę narzędziową Qt firmy Trolltech.
111
112 QuaZIP pozwala na dostęp do plików wewnątrz archiwów ZIP przy użyciu
113 API QIODevice, co oznacza, że można używać QTextStream, QDataStream,
114 jak i innych na zzipowanych plikach.
115
116 QuaZIP udostępnia pełną abstrakcję API ZIP/UNZIP, zarówno dla odczytu,
117 jak i zapisu plikówZIP.
118
119 %package qt5-devel
120 Summary:        Development files for QuaZIP (Qt 5 version)
121 Summary(pl.UTF-8):      Pliki programistyczne biblioteki QuaZIP (wersja dla Qt 5)
122 Group:          Development/Libraries
123 Requires:       %{name}-qt5 = %{version}-%{release}
124 Requires:       Qt5Core-devel >= 5
125 Requires:       zlib-devel
126
127 %description qt5-devel
128 This package contains the header files and documentation for
129 developing applications that use QuaZIP with Qt 5.
130
131 %description qt5-devel -l pl.UTF-8
132 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do tworzenia
133 aplikacji wykorzystujących QuaZIP wraz z Qt 5.
134
135 %package qt5-static
136 Summary:        Static QuaZIP library (Qt 5 version)
137 Summary(pl.UTF-8):      Statyczna biblioteka QuaZIP (wersja dla Qt 5)
138 Group:          Development/Libraries
139 Requires:       %{name}-qt5-devel = %{version}-%{release}
140
141 %description qt5-static
142 Static QuaZIP library (Qt 5 version).
143
144 %description qt5-static -l pl.UTF-8
145 Statyczna biblioteka QuaZIP (wersja dla Qt 5).
146
147 %package apidocs
148 Summary:        API documentation for QuaZIP libraries
149 Summary(pl.UTF-8):      Dokumentacja API bibliotek QuaZIP
150 Group:          Documentation
151 BuildArch:      noarch
152
153 %description apidocs
154 API documentation for QuaZIP libraries.
155
156 %description apidocs -l pl.UTF-8
157 Dokumentacja API bibliotek QuaZIP.
158
159 %prep
160 %setup -q
161 %patch0 -p1
162
163 %build
164 export CXXFLAGS="%{rpmcxxflags} -fPIC"
165 %if %{with qt4}
166 %cmake -B build-qt4 \
167         -DQUAZIP_QT_MAJOR_VERSION=4
168
169 %{__make} -C build-qt4
170
171 %if %{with static_libs}
172 %cmake -B build-qt4-static \
173         -DBUILD_SHARED_LIBS=OFF \
174         -DQUAZIP_QT_MAJOR_VERSION=4
175
176 %{__make} -C build-qt4-static
177 %endif
178 %endif
179
180 %if %{with qt5}
181 %cmake -B build-qt5 \
182         -DQUAZIP_QT_MAJOR_VERSION=5
183
184 %{__make} -C build-qt5
185
186 %if %{with static_libs}
187 %cmake -B build-qt5-static \
188         -DBUILD_SHARED_LIBS=OFF \
189         -DQUAZIP_QT_MAJOR_VERSION=5
190
191 %{__make} -C build-qt5-static
192 %endif
193 %endif
194
195 doxygen Doxyfile
196 for file in doc/html/*; do
197         touch -r Doxyfile $file
198 done
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %if %{with qt4}
204 %{__make} -C build-qt4 install/fast \
205         DESTDIR=$RPM_BUILD_ROOT
206
207 %if %{with static_libs}
208 %{__make} -C build-qt4-static install/fast \
209         DESTDIR=$RPM_BUILD_ROOT
210 %endif
211 %endif
212
213 %if %{with qt5}
214 %{__make} -C build-qt5 install/fast \
215         DESTDIR=$RPM_BUILD_ROOT
216
217 %if %{with static_libs}
218 %{__make} -C build-qt5-static install/fast \
219         DESTDIR=$RPM_BUILD_ROOT
220 %endif
221 %endif
222
223 %clean
224 rm -rf $RPM_BUILD_ROOT
225
226 %post   -p /sbin/ldconfig
227 %postun -p /sbin/ldconfig
228
229 %post   qt5 -p /sbin/ldconfig
230 %postun qt5 -p /sbin/ldconfig
231
232 %if %{with qt4}
233 %files
234 %defattr(644,root,root,755)
235 %doc COPYING NEWS.txt README.md
236 %attr(755,root,root) %{_libdir}/libquazip1-qt4.so.*.*.*
237 %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt4.so.1.3
238
239 %files devel
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libquazip1-qt4.so
242 %{_includedir}/QuaZip-Qt4-1.3
243 %{_libdir}/cmake/QuaZip-Qt4-1.3
244 %{_pkgconfigdir}/quazip1-qt4.pc
245
246 %if %{with static_libs}
247 %files static
248 %defattr(644,root,root,755)
249 %{_libdir}/libquazip1-qt4.a
250 %endif
251 %endif
252
253 %if %{with qt5}
254 %files qt5
255 %defattr(644,root,root,755)
256 %doc COPYING NEWS.txt README.md
257 %attr(755,root,root) %{_libdir}/libquazip1-qt5.so.*.*.*
258 %attr(755,root,root) %ghost %{_libdir}/libquazip1-qt5.so.1.3
259
260 %files qt5-devel
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libquazip1-qt5.so
263 %{_includedir}/QuaZip-Qt5-1.3
264 %{_libdir}/cmake/QuaZip-Qt5-1.3
265 %{_pkgconfigdir}/quazip1-qt5.pc
266
267 %if %{with static_libs}
268 %files qt5-static
269 %defattr(644,root,root,755)
270 %{_libdir}/libquazip1-qt5.a
271 %endif
272 %endif
273
274 %files apidocs
275 %defattr(644,root,root,755)
276 %doc doc/html/*.{css,html,js,png}
This page took 0.087953 seconds and 2 git commands to generate.