Accepting request 482421 from home:luca_b:branches:Base:System

- Re-conditionalize python builds, to allow gpgme to build on 
  Leap 42.3 (python tests fail with an older gpg, see 
  gpg issue 3008)
- Enable Qt build also on Leap 42.3 (needed for KDE PIM)

OBS-URL: https://build.opensuse.org/request/show/482421
OBS-URL: https://build.opensuse.org/package/show/Base:System/gpgme?expand=0&rev=85
This commit is contained in:
Tomáš Chvátal 2017-03-24 15:14:23 +00:00 committed by Git OBS Bridge
parent 286b6f9869
commit 35580c25b1
2 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Mar 23 21:54:04 UTC 2017 - lbeltrame@kde.org
- Re-conditionalize python builds, to allow gpgme to build on
Leap 42.3 (python tests fail with an older gpg, see
gpg issue 3008)
- Enable Qt build also on Leap 42.3 (needed for KDE PIM)
-------------------------------------------------------------------
Tue Feb 14 09:46:57 UTC 2017 - tchvatal@suse.com

View File

@ -16,7 +16,17 @@
#
%define with_qt 0%{?suse_version} >= 1330
# Enable Qt bindings on TW and 42.3 (needed for KDE PIM)
%if 0%{?suse_version} >= 1330 || 0%{?sle_version} >= 120300
%global with_qt 1
%endif
# Only enable Python bindings with TW, or tests will fail with an older gpg
# https://bugs.gnupg.org/gnupg/issue3008
%if 0%{?suse_version} >= 1330
%global with_python 1
%endif
Name: gpgme
Version: 1.8.0
Release: 0
@ -38,8 +48,10 @@ BuildRequires: gpg2 >= 2.0.10
BuildRequires: libassuan-devel >= 2.0.2
BuildRequires: libgpg-error-devel >= 1.17
BuildRequires: pkgconfig
%if 0%{?with_python}
BuildRequires: python-devel >= 2.7
BuildRequires: python3-devel >= 3.4
%endif
BuildRequires: swig
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
@ -116,6 +128,7 @@ management.
This subpackage contains the headers needed for building applications
making use of libgpgmepp.
%if 0%{?with_python}
%package -n python-gpg
Summary: Python 2 bindings for GPGME, a library for accessing GnuPG
Group: Development/Languages/Python
@ -139,6 +152,7 @@ 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
@ -175,10 +189,16 @@ This package contains the bindings to use the library in Qt C++ applications.
%build
build_timestamp=$(date -u +%{Y}-%{m}-%{dT}%{H}:%{M}+0000 -r %{SOURCE99})
languages="cl cpp python"
%if %{with_qt}
languages="cl cpp"
%if 0%{?with_python}
languages="${languages} python"
%endif
%if 0%{?with_qt}
languages="${languages} qt"
%endif # with_qt
%configure \
--disable-silent-rules \
--disable-static \
@ -192,6 +212,7 @@ make %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
chmod -x %{buildroot}%{_libdir}/cmake/Gpgmepp/*.cmake
%if 0%{?with_python}
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
@ -199,6 +220,7 @@ rm -vf %{buildroot}%{python_sitelib}/gpg/install_files.txt
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
%endif
%check
%if ! 0%{?qemu_user_space_build}
@ -251,6 +273,7 @@ make %{?_smp_mflags} check
%dir %{_libdir}/cmake/Gpgmepp
%{_libdir}/cmake/Gpgmepp/GpgmeppConfig*.cmake
%if 0%{?with_python}
%files -n python-gpg
%defattr(-,root,root)
%{python_sitearch}/gpg
@ -258,6 +281,7 @@ make %{?_smp_mflags} check
%files -n python3-gpg
%defattr(-,root,root)
%{python3_sitearch}/gpg
%endif
%if 0%{with_qt}
%files -n libqgpgme7