SHA256
1
0
forked from pool/gpgme

- Tweak up the python conditional to allow us finegraining and

selecting only py2 or py3 if needed

OBS-URL: https://build.opensuse.org/package/show/Base:System/gpgme?expand=0&rev=92
This commit is contained in:
Tomáš Chvátal 2018-01-08 10:31:58 +00:00 committed by Git OBS Bridge
parent cfa6a42400
commit 5bed7fb432
2 changed files with 19 additions and 11 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 8 10:17:39 UTC 2018 - tchvatal@suse.com
- Tweak up the python conditional to allow us finegraining and
selecting only py2 or py3 if needed
-------------------------------------------------------------------
Tue Dec 12 16:44:59 UTC 2017 - astieger@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package gpgme
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,9 +18,8 @@
# Enable Qt bindings on TW and 42.3 (needed for KDE PIM)
%define with_qt 0%{?suse_version} >= 1330 || 0%{?sle_version} >= 120300
# Only enable Python bindings with TW, or tests will fail with an older gpg
# https://bugs.gnupg.org/gnupg/issue3008
%define with_python 0%{?suse_version} >= 1330
%bcond_without python2
%bcond_without python3
Name: gpgme
Version: 1.10.0
Release: 0
@ -42,8 +41,10 @@ BuildRequires: pkgconfig
BuildRequires: swig
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
%if 0%{?with_python}
%if %{with python2}
BuildRequires: python2-devel >= 2.7
%endif
%if %{with python3}
BuildRequires: python3-devel >= 3.4
%endif
%if 0%{with_qt}
@ -118,7 +119,6 @@ management.
This subpackage contains the headers needed for building applications
making use of libgpgmepp.
%if 0%{?with_python}
%package -n python2-gpg
Summary: Python 2 bindings for GPGME, a library for accessing GnuPG
Group: Development/Languages/Python
@ -144,7 +144,6 @@ encryption, decryption, signing, signature verification, and key
management.
This package contains the bindings to use the library from Python 3 applications.
%endif
%package -n libqgpgme7
Summary: Programmatic Qt library interface to GnuPG
@ -181,7 +180,7 @@ This package contains the bindings to use the library in Qt C++ applications.
build_timestamp=$(date -u +%{Y}-%{m}-%{dT}%{H}:%{M}+0000 -r %{SOURCE99})
languages="cl cpp"
%if 0%{?with_python}
%if %{with python2} || %{with python3}
languages="${languages} python"
%endif
@ -202,11 +201,12 @@ make %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
chmod -x %{buildroot}%{_libdir}/cmake/Gpgmepp/*.cmake
%if 0%{?with_python}
%if %{with python2}
find %{buildroot}%{python_sitearch}/gpg-*.egg-info -delete -print
find %{buildroot}%{python_sitearch}/gpg -type f -name "*.pyc" -delete -print
rm -vf %{buildroot}%{python_sitelib}/gpg/install_files.txt
%endif
%if %{with python3}
find %{buildroot}%{python3_sitearch}/gpg-*.egg-info -delete -print
rm -vf %{buildroot}%{python3_sitelib}/gpg/install_files.txt
find %{buildroot}%{python3_sitearch}/gpg -type f -name "*.pyc" -delete -print
@ -258,10 +258,12 @@ make %{?_smp_mflags} check
%dir %{_libdir}/cmake/Gpgmepp
%{_libdir}/cmake/Gpgmepp/GpgmeppConfig*.cmake
%if 0%{?with_python}
%if %{with python2}
%files -n python2-gpg
%{python_sitearch}/gpg
%endif
%if %{with python3}
%files -n python3-gpg
%{python3_sitearch}/gpg
%endif