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