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