]>
Commit | Line | Data |
---|---|---|
2a95feb1 JB |
1 | # |
2 | # Conditional build: | |
b167f38b | 3 | %bcond_without static_libs # do not build static libraries |
3b3330f6 | 4 | %bcond_without commonlisp # Common Lisp interface |
04bb14bc JB |
5 | %bcond_without cxx # C++ interface (GpgMEpp library) |
6 | %bcond_without qt5 # Qt 5 interface (QGpgME library), requires cxx | |
7 | %bcond_without python # Python interfaces (PyME, both python2+python3) | |
8 | %bcond_without python2 # Python 2 interface (PyME) | |
9 | %bcond_without python3 # Python 3 interface (PyME) | |
b167f38b | 10 | %bcond_with tests # perform tests |
2a95feb1 | 11 | # |
04bb14bc JB |
12 | %if %{without python} |
13 | %undefine with_python2 | |
14 | %undefine with_python3 | |
15 | %endif | |
16 | %if %{without cxx} | |
17 | %undefine with_qt5 | |
18 | %endif | |
01babd9f | 19 | Summary: Library for accessing GnuPG |
ab1d0abf | 20 | Summary(pl.UTF-8): Biblioteka dająca dostęp do funkcji GnuPG |
01babd9f | 21 | Name: gpgme |
ddea86d7 JB |
22 | Version: 1.12.0 |
23 | Release: 1 | |
92e3a3cd | 24 | Epoch: 1 |
57d17492 | 25 | License: LGPL v2.1+ |
01babd9f | 26 | Group: Libraries |
57d17492 | 27 | Source0: ftp://ftp.gnupg.org/gcrypt/gpgme/%{name}-%{version}.tar.bz2 |
ddea86d7 | 28 | # Source0-md5: 902fca3a94907efe4e929b2ade545a7c |
41e9547e | 29 | Patch0: %{name}-info.patch |
2b597a7e | 30 | Patch1: %{name}-kill-tests.patch |
04bb14bc JB |
31 | Patch2: %{name}-largefile.patch |
32 | Patch3: %{name}-python.patch | |
01babd9f | 33 | URL: http://www.gnupg.org/gpgme.html |
50116f20 | 34 | BuildRequires: autoconf >= 2.59 |
74664a9d | 35 | BuildRequires: automake >= 1:1.14 |
a4b4d7c9 | 36 | %{?with_tests:BuildRequires: gnupg-agent} |
d3ec171e | 37 | BuildRequires: libassuan-devel >= 1:2.4.2 |
a7d28b40 | 38 | BuildRequires: libgpg-error-devel >= 1.29 |
04bb14bc | 39 | %{?with_cxx:BuildRequires: libstdc++-devel >= 6:4.7} |
f85acd43 | 40 | BuildRequires: libtool >= 2:2.2.6 |
04bb14bc JB |
41 | %{?with_python2:BuildRequires: python-devel >= 1:2.7} |
42 | %{?with_python3:BuildRequires: python3-devel >= 1:3.4} | |
43 | %{?with_python:BuildRequires: rpm-pythonprov} | |
44 | BuildRequires: rpmbuild(macros) >= 1.219 | |
45 | %{?with_python:BuildRequires: swig-python} | |
41e9547e | 46 | BuildRequires: texinfo |
04bb14bc JB |
47 | %if %{with qt5} |
48 | BuildRequires: Qt5Core-devel >= 5.0.0 | |
49 | %{?with_tests:BuildRequires: Qt5Test-devel >= 5.0.0} | |
50 | BuildRequires: doxygen | |
51 | BuildRequires: graphviz | |
52 | BuildRequires: qt5-build >= 5.0.0 | |
53 | %endif | |
4c03fa3d | 54 | BuildConflicts: gnupg < 1.3.0 |
86e07236 TP |
55 | Suggests: gnupg >= 1.4.0 |
56 | Suggests: gnupg-smime >= 1.9.8 | |
57 | Suggests: gnupg2 >= 2.0.4 | |
d3ec171e | 58 | Requires: libassuan >= 1:2.4.2 |
a7d28b40 | 59 | Requires: libgpg-error >= 1.29 |
8ceb1a35 | 60 | Obsoletes: cryptplug |
01babd9f | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
62 | ||
63 | %description | |
64 | A library for accessing GnuPG. | |
65 | ||
1dd36cc5 JR |
66 | %description -l pl.UTF-8 |
67 | Biblioteka dająca dostęp do funkcji GnuPG. | |
01babd9f | 68 | |
69 | %package devel | |
bed1b366 | 70 | Summary: Header files for GPGME library |
ab1d0abf | 71 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GPGME |
3b45cfe6 | 72 | Group: Development/Libraries |
92e3a3cd | 73 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d3ec171e | 74 | Requires: libassuan-devel >= 1:2.4.2 |
a7d28b40 | 75 | Requires: libgpg-error-devel >= 1.29 |
01babd9f | 76 | |
77 | %description devel | |
bed1b366 JB |
78 | Header files for GPGME library, needed for compiling programs using |
79 | GPGME. | |
01babd9f | 80 | |
1dd36cc5 JR |
81 | %description devel -l pl.UTF-8 |
82 | Pliki nagłówkowe biblioteki GPGME, potrzebne do kompilacji programów | |
83 | używających GPGME. | |
01babd9f | 84 | |
85 | %package static | |
bed1b366 | 86 | Summary: Static version of GPGME library |
ab1d0abf | 87 | Summary(pl.UTF-8): Statyczna wersja biblioteki GPGME |
01babd9f | 88 | Group: Development/Libraries |
92e3a3cd | 89 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
01babd9f | 90 | |
91 | %description static | |
bed1b366 | 92 | Static version of GPGME library. |
01babd9f | 93 | |
1dd36cc5 | 94 | %description static -l pl.UTF-8 |
bed1b366 | 95 | Statyczna wersja biblioteki GPGME. |
01babd9f | 96 | |
04bb14bc JB |
97 | %package c++ |
98 | Summary: GpgMEpp - C++ interface for GPGME library | |
99 | Summary(pl.UTF-8): GpgMEpp - interfejs C++ do biblioteki GPGME | |
100 | Group: Libraries | |
7f5e677d | 101 | Requires: %{name} = %{epoch}:%{version}-%{release} |
04bb14bc JB |
102 | |
103 | %description c++ | |
104 | GpgMEpp is a C++ wrapper (or C++ bindings) for the GnuPG project's | |
105 | gpgme (GnuPG Made Easy). It's based on KF5gpgmepp library. | |
106 | ||
107 | %description c++ -l pl.UTF-8 | |
108 | GpgMEpp to interfejs C++ (wiązania C++) do biblioteki gpgme (GnuPG | |
109 | Made Easy) z projektu GnuPG. Jest oparty na bibliotece KF5gpgme.pp. | |
110 | ||
111 | %package c++-devel | |
112 | Summary: Header files for GpgMEpp library | |
113 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GpgMEpp | |
114 | Group: Development/Libraries | |
7f5e677d | 115 | Requires: %{name}-c++ = %{epoch}:%{version}-%{release} |
04bb14bc | 116 | Requires: libstdc++-devel >= 6:4.7 |
a4b4d7c9 | 117 | Conflicts: kde4-kdepimlibs-devel |
04bb14bc JB |
118 | |
119 | %description c++-devel | |
120 | Header files for GpgMEpp library. | |
121 | ||
122 | %description c++-devel -l pl.UTF-8 | |
123 | Pliki nagłówkowe biblioteki GpgMEpp. | |
124 | ||
125 | %package c++-static | |
126 | Summary: Static GpgMEpp library | |
127 | Summary(pl.UTF-8): Statyczna biblioteka GpgMEpp | |
128 | Group: Development/Libraries | |
7f5e677d | 129 | Requires: %{name}-c++-devel = %{epoch}:%{version}-%{release} |
04bb14bc JB |
130 | |
131 | %description c++-static | |
132 | Static GpgMEpp library. | |
133 | ||
134 | %description c++-static -l pl.UTF-8 | |
135 | Statyczna biblioteka GpgMEpp. | |
136 | ||
137 | %package qt5 | |
138 | Summary: QGpgME - Qt 5 interface for GPGME library | |
139 | Summary(pl.UTF-8): QGpgME - interfejs Qt 5 do biblioteki GPGME | |
140 | License: GPL v2+ with Qt linking exception | |
141 | Group: Libraries | |
7f5e677d | 142 | Requires: %{name}-c++ = %{epoch}:%{version}-%{release} |
04bb14bc JB |
143 | Requires: Qt5Core >= 5.0.0 |
144 | ||
145 | %description qt5 | |
146 | QGpgME is Qt 5 interface for GPGME library, based on library from | |
147 | KF5gpgmepp. QGpgME provides a very high level Qt API around GpgMEpp. | |
148 | ||
149 | %description qt5 -l pl.UTF-8 | |
150 | QGpgME to interfejs Qt 5 do biblioteki GPGME, oparty na bibliotece z | |
151 | KF5gpgmepp. QGpgME udostępnia API Qt do GpgMEpp bardzo wysokiego | |
152 | poziomu. | |
153 | ||
154 | %package qt5-devel | |
155 | Summary: Header files for QGpgME library | |
156 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki QGpgME | |
157 | License: GPL v2+ with Qt linking exception | |
158 | Group: Development/Libraries | |
7f5e677d JR |
159 | Requires: %{name}-c++-devel = %{epoch}:%{version}-%{release} |
160 | Requires: %{name}-qt5 = %{epoch}:%{version}-%{release} | |
04bb14bc | 161 | Requires: Qt5Core-devel >= 5.0.0 |
a4b4d7c9 | 162 | Conflicts: kde4-kdepimlibs-devel |
04bb14bc JB |
163 | |
164 | %description qt5-devel | |
165 | Header files for QGpgME library. | |
166 | ||
167 | %description qt5-devel -l pl.UTF-8 | |
168 | Pliki nagłówkowe biblioteki QGpgME. | |
169 | ||
170 | %package qt5-static | |
171 | Summary: Static QGpgME library | |
172 | Summary(pl.UTF-8): Statyczna biblioteka QGpgME | |
173 | License: GPL v2+ with Qt linking exception | |
174 | Group: Development/Libraries | |
7f5e677d | 175 | Requires: %{name}-qt5-devel = %{epoch}:%{version}-%{release} |
04bb14bc JB |
176 | |
177 | %description qt5-static | |
178 | Static QGpgME library. | |
179 | ||
180 | %description qt5-static -l pl.UTF-8 | |
181 | Statyczna biblioteka QGpgME. | |
182 | ||
3b3330f6 JB |
183 | %package -n common-lisp-gpgme |
184 | Summary: Common Lisp binding for GPGME library | |
185 | Summary(pl.UTF-8): Wiązanie Common Lispa do biblioteki GPGME | |
186 | Group: Libraries | |
7f5e677d | 187 | Requires: %{name} = %{epoch}:%{version}-%{release} |
3b3330f6 JB |
188 | Requires: common-lisp-controller |
189 | ||
190 | %description -n common-lisp-gpgme | |
191 | Common Lisp binding for GPGME library. | |
192 | ||
193 | %description -n common-lisp-gpgme -l pl.UTF-8 | |
194 | Wiązanie Common Lispa do biblioteki GPGME. | |
195 | ||
ac6cdcae | 196 | %package -n python-gpg |
04bb14bc JB |
197 | Summary: PyME - Python 2 interface for GPGME library |
198 | Summary(pl.UTF-8): PyME - interfejs Pythona 2 do biblioteki GPGME | |
199 | Group: Libraries/Python | |
7f5e677d | 200 | Requires: %{name} = %{epoch}:%{version}-%{release} |
04bb14bc | 201 | Requires: python-libs >= 1:2.7 |
ac6cdcae | 202 | Obsoletes: python-pyme < 1.8.0 |
04bb14bc | 203 | |
ac6cdcae | 204 | %description -n python-gpg |
04bb14bc JB |
205 | PyME is a Python interface for GPGME library. |
206 | ||
ac6cdcae | 207 | %description -n python-gpg -l pl.UTF-8 |
04bb14bc JB |
208 | PyME to interfejs Pythona do biblioteki GPGME. |
209 | ||
ac6cdcae | 210 | %package -n python3-gpg |
04bb14bc JB |
211 | Summary: PyME - Python 3 interface for GPGME library |
212 | Summary(pl.UTF-8): PyME - interfejs Pythona 3 do biblioteki GPGME | |
213 | Group: Libraries/Python | |
7f5e677d | 214 | Requires: %{name} = %{epoch}:%{version}-%{release} |
04bb14bc | 215 | Requires: python3-libs >= 1:3.4 |
ac6cdcae | 216 | Obsoletes: python3-pyme < 1.8.0 |
04bb14bc | 217 | |
ac6cdcae | 218 | %description -n python3-gpg |
04bb14bc JB |
219 | PyME is a Python interface for GPGME library. |
220 | ||
ac6cdcae | 221 | %description -n python3-gpg -l pl.UTF-8 |
04bb14bc JB |
222 | PyME to interfejs Pythona do biblioteki GPGME. |
223 | ||
01babd9f | 224 | %prep |
225 | %setup -q | |
41e9547e | 226 | %patch0 -p1 |
2b597a7e | 227 | %{!?with_tests:%patch1 -p1} |
44f0380a | 228 | %patch2 -p1 |
04bb14bc | 229 | %patch3 -p1 |
01babd9f | 230 | |
231 | %build | |
ba43bb7f | 232 | %{__libtoolize} |
2c260d51 | 233 | %{__aclocal} -I m4 |
7cde39a6 | 234 | %{__autoconf} |
b7ca4280 | 235 | %{__autoheader} |
7cde39a6 | 236 | %{__automake} |
04bb14bc JB |
237 | # in enable-languages: |
238 | # "python" means both pythons (if available), "python2" just python2, "python3" just python3 | |
239 | # (cannot specify "python2 python3" due to script limitations) | |
01babd9f | 240 | %configure \ |
04bb14bc | 241 | --enable-languages="%{?with_commonlisp:cl} %{?with_cxx:cpp} %{?with_python2:python%{!?with_python3:2}} %{?with_python3:%{!?with_python2:python3}} %{?with_qt5:qt}" \ |
86e07236 | 242 | %{?with_static_libs:--enable-static} |
01babd9f | 243 | |
244 | %{__make} | |
245 | ||
246 | %install | |
247 | rm -rf $RPM_BUILD_ROOT | |
01babd9f | 248 | |
8815e16b JB |
249 | %{__make} install \ |
250 | DESTDIR=$RPM_BUILD_ROOT | |
01babd9f | 251 | |
04bb14bc JB |
252 | %if %{with python2} |
253 | %py_postclean | |
254 | %endif | |
255 | ||
01babd9f | 256 | %clean |
257 | rm -rf $RPM_BUILD_ROOT | |
258 | ||
180ddcb9 JB |
259 | %post -p /sbin/ldconfig |
260 | %postun -p /sbin/ldconfig | |
261 | ||
f85acd43 | 262 | %post devel -p /sbin/postshell |
1cf551df | 263 | -/usr/sbin/fix-info-dir -c %{_infodir} |
01babd9f | 264 | |
f85acd43 | 265 | %postun devel -p /sbin/postshell |
1cf551df | 266 | -/usr/sbin/fix-info-dir -c %{_infodir} |
01babd9f | 267 | |
04bb14bc JB |
268 | %post c++ -p /sbin/ldconfig |
269 | %postun c++ -p /sbin/ldconfig | |
270 | ||
271 | %post qt5 -p /sbin/ldconfig | |
272 | %postun qt5 -p /sbin/ldconfig | |
273 | ||
01babd9f | 274 | %files |
275 | %defattr(644,root,root,755) | |
04bb14bc | 276 | %doc AUTHORS ChangeLog README NEWS THANKS TODO |
a7d28b40 | 277 | %attr(755,root,root) %{_bindir}/gpgme-json |
d158acd8 | 278 | %attr(755,root,root) %{_bindir}/gpgme-tool |
5276b199 JB |
279 | %attr(755,root,root) %{_libdir}/libgpgme.so.*.*.* |
280 | %attr(755,root,root) %ghost %{_libdir}/libgpgme.so.11 | |
01babd9f | 281 | |
282 | %files devel | |
3b45cfe6 JB |
283 | %defattr(644,root,root,755) |
284 | %attr(755,root,root) %{_bindir}/gpgme-config | |
5276b199 | 285 | %attr(755,root,root) %{_libdir}/libgpgme.so |
5276b199 | 286 | %{_libdir}/libgpgme.la |
5276b199 JB |
287 | %{_includedir}/gpgme.h |
288 | %{_aclocaldir}/gpgme.m4 | |
289 | %{_infodir}/gpgme.info* | |
01babd9f | 290 | |
fa55d1b4 | 291 | %if %{with static_libs} |
01babd9f | 292 | %files static |
3b45cfe6 | 293 | %defattr(644,root,root,755) |
5276b199 | 294 | %{_libdir}/libgpgme.a |
fa55d1b4 | 295 | %endif |
04bb14bc JB |
296 | |
297 | %if %{with cxx} | |
298 | %files c++ | |
299 | %defattr(644,root,root,755) | |
300 | %doc lang/cpp/README | |
301 | %attr(755,root,root) %{_libdir}/libgpgmepp.so.*.*.* | |
302 | %attr(755,root,root) %ghost %{_libdir}/libgpgmepp.so.6 | |
303 | ||
304 | %files c++-devel | |
305 | %defattr(644,root,root,755) | |
306 | %attr(755,root,root) %{_libdir}/libgpgmepp.so | |
307 | %{_libdir}/libgpgmepp.la | |
308 | %{_includedir}/gpgme++ | |
ac6cdcae | 309 | %{_libdir}/cmake/Gpgmepp |
04bb14bc JB |
310 | |
311 | %if %{with static_libs} | |
312 | %files c++-static | |
313 | %defattr(644,root,root,755) | |
314 | %{_libdir}/libgpgmepp.a | |
315 | %endif | |
316 | ||
317 | %if %{with qt5} | |
318 | %files qt5 | |
319 | %defattr(644,root,root,755) | |
320 | %doc lang/qt/README | |
321 | %attr(755,root,root) %{_libdir}/libqgpgme.so.*.*.* | |
ac6cdcae | 322 | %attr(755,root,root) %ghost %{_libdir}/libqgpgme.so.7 |
04bb14bc JB |
323 | |
324 | %files qt5-devel | |
325 | %defattr(644,root,root,755) | |
326 | %attr(755,root,root) %{_libdir}/libqgpgme.so | |
327 | %{_libdir}/libqgpgme.la | |
328 | %{_includedir}/QGpgME | |
329 | %{_includedir}/qgpgme | |
ac6cdcae | 330 | %{_libdir}/cmake/QGpgme |
04bb14bc JB |
331 | |
332 | %if %{with static_libs} | |
333 | %files qt5-static | |
334 | %defattr(644,root,root,755) | |
335 | %{_libdir}/libqgpgme.a | |
336 | %endif | |
337 | %endif | |
338 | %endif | |
339 | ||
3b3330f6 JB |
340 | %if %{with commonlisp} |
341 | %files -n common-lisp-gpgme | |
342 | %defattr(644,root,root,755) | |
343 | %doc lang/cl/README | |
344 | %{_datadir}/common-lisp/source/gpgme | |
345 | %endif | |
346 | ||
04bb14bc | 347 | %if %{with python2} |
ac6cdcae | 348 | %files -n python-gpg |
04bb14bc JB |
349 | %defattr(644,root,root,755) |
350 | %doc lang/python/README | |
ac6cdcae JB |
351 | %dir %{py_sitedir}/gpg |
352 | %attr(755,root,root) %{py_sitedir}/gpg/_gpgme.so | |
353 | %{py_sitedir}/gpg/*.py[co] | |
354 | %{py_sitedir}/gpg/constants | |
355 | %{py_sitedir}/gpg-%{version}-py*.egg-info | |
04bb14bc JB |
356 | %endif |
357 | ||
358 | %if %{with python3} | |
ac6cdcae | 359 | %files -n python3-gpg |
04bb14bc JB |
360 | %defattr(644,root,root,755) |
361 | %doc lang/python/README | |
ac6cdcae JB |
362 | %dir %{py3_sitedir}/gpg |
363 | %attr(755,root,root) %{py3_sitedir}/gpg/_gpgme.cpython-*.so | |
364 | %{py3_sitedir}/gpg/*.py | |
365 | %{py3_sitedir}/gpg/__pycache__ | |
366 | %{py3_sitedir}/gpg/constants | |
367 | %{py3_sitedir}/gpg-%{version}-py*.egg-info | |
04bb14bc | 368 | %endif |