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