Accepting request 457046 from Base:System

- Unconditionalize python and python3 builds
- Unconditionalize c++ build

- Fix RPM groups

- Do not condition around the qt version as it breaks baselibs validator

- gpgme-include_functional.patch: include <functional> where
  needed, fix GCC7 build

OBS-URL: https://build.opensuse.org/request/show/457046
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gpgme?expand=0&rev=67
This commit is contained in:
Dominique Leuenberger 2017-02-16 15:48:39 +00:00 committed by Git OBS Bridge
commit 6c4e4ca4cf
3 changed files with 67 additions and 63 deletions

View File

@ -0,0 +1,24 @@
Index: gpgme-1.8.0/lang/qt/src/qgpgmenewcryptoconfig.cpp
===================================================================
--- gpgme-1.8.0.orig/lang/qt/src/qgpgmenewcryptoconfig.cpp
+++ gpgme-1.8.0/lang/qt/src/qgpgmenewcryptoconfig.cpp
@@ -49,6 +49,7 @@
#include <sstream>
#include <string>
#include <cassert>
+#include <functional>
using namespace QGpgME;
using namespace GpgME;
Index: gpgme-1.8.0/lang/qt/src/threadedjobmixin.h
===================================================================
--- gpgme-1.8.0.orig/lang/qt/src/threadedjobmixin.h
+++ gpgme-1.8.0/lang/qt/src/threadedjobmixin.h
@@ -51,6 +51,7 @@
#include "job.h"
#include <cassert>
+#include <functional>
namespace QGpgME
{

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Tue Feb 14 09:46:57 UTC 2017 - tchvatal@suse.com
- Unconditionalize python and python3 builds
- Unconditionalize c++ build
-------------------------------------------------------------------
Mon Feb 13 18:39:46 UTC 2017 - jengelh@inai.de
- Fix RPM groups
-------------------------------------------------------------------
Mon Feb 13 15:47:19 UTC 2017 - tchvatal@suse.com
- Do not condition around the qt version as it breaks baselibs validator
-------------------------------------------------------------------
Tue Feb 7 02:48:46 UTC 2017 - crrodriguez@opensuse.org
- gpgme-include_functional.patch: include <functional> where
needed, fix GCC7 build
-------------------------------------------------------------------
Tue Nov 22 23:19:10 UTC 2016 - lbeltrame@kde.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gpgme
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@ -16,9 +16,6 @@
#
%define with_cpp 1
%define with_python2 1
%define with_python3 0
%define with_qt 0%{?suse_version} >= 1330
Name: gpgme
Version: 1.8.0
@ -35,24 +32,18 @@ Source3: gpgme.keyring
Source99: %{name}.changes
#PATCH-FIX-UPSTREAM: remove-a-forgotten-instance-of-libsuffix.diff - Fix cmake files (or it will break KDE software building)
Patch1: remove-a-forgotten-instance-of-libsuffix.diff
Patch2: gpgme-include_functional.patch
BuildRequires: gcc-c++
BuildRequires: gpg2 >= 2.0.10
BuildRequires: libassuan-devel >= 2.0.2
BuildRequires: libgpg-error-devel >= 1.17
BuildRequires: pkgconfig
BuildRequires: python-devel >= 2.7
BuildRequires: python3-devel >= 3.4
BuildRequires: swig
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{with_python2}
BuildRequires: python-devel >= 2.7
BuildRequires: swig
%endif # with_python2
%if 0%{with_python3}
BuildRequires: python3-devel >= 3.4
BuildRequires: swig
%endif # with_python3
%if 0%{with_cpp}
BuildRequires: gcc-c++
%endif # with_cpp
%if 0%{with_qt}
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Test)
@ -66,7 +57,7 @@ management. It uses GnuPG as its back-end.
%package -n libgpgme11
Summary: Programmatic library interface to GnuPG
Group: Development/Libraries/C and C++
Group: System/Libraries
Requires: gpg2
%description -n libgpgme11
@ -94,10 +85,9 @@ management.
This subpackage contains the headers needed for building applications
making use of libgpgme.
%if 0%{with_cpp}
%package -n libgpgmepp6
Summary: Programmatic C++ library interface to GnuPG
Group: Development/Libraries/C and C++
Group: System/Libraries
Requires: gpg2
%description -n libgpgmepp6
@ -126,12 +116,9 @@ management.
This subpackage contains the headers needed for building applications
making use of libgpgmepp.
%endif # with_cpp
%if 0%{with_python2}
%package -n python-gpg
Summary: Python 2 bindings for GPGME, a library for accessing GnuPG
Group: Development/Libraries/Python
Group: Development/Languages/Python
%description -n python-gpg
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
@ -140,12 +127,10 @@ encryption, decryption, signing, signature verification, and key
management.
This package contains the bindings to use the library from Python 2 applications.
%endif # with_python2
%if 0%{with_python3}
%package -n python3-gpg
Summary: Python 3 bindings for GPGME, a library for accessing GnuPG
Group: Development/Libraries/Python
Group: Development/Languages/Python
%description -n python3-gpg
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
@ -154,12 +139,10 @@ encryption, decryption, signing, signature verification, and key
management.
This package contains the bindings to use the library from Python 3 applications.
%endif # with_python3
%if 0%{with_qt}
%package -n libqgpgme7
Summary: Programmatic Qt library interface to GnuPG
Group: Development/Libraries/C and C++
Group: System/Libraries
Requires: gpg2
%description -n libqgpgme7
@ -185,51 +168,37 @@ management.
This package contains the bindings to use the library in Qt C++ applications.
%endif # with_qt
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
build_timestamp=$(date -u +%{Y}-%{m}-%{dT}%{H}:%{M}+0000 -r %{SOURCE99})
languages="cl"
%if 0%{with_cpp}
languages="${languages} cpp"
languages="cl cpp python"
%if %{with_qt}
languages="${languages} qt"
%endif # with_qt
%endif # with_cpp
%if 0%{with_python2}
languages="${languages} python2"
%endif # with_python2
%if 0%{with_python3}
languages="${languages} python3"
%endif # with_python3
%configure \
--disable-silent-rules \
--disable-static \
--disable-fd-passing \
--enable-languages="${languages}" \
--enable-build-timestamp="${build_timestamp}"
make %{?_smp_mflags}
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%if 0%{with_cpp}
chmod -x %{buildroot}%{_libdir}/cmake/Gpgmepp/*.cmake
%endif # with_cpp
%if 0%{with_python2}
find %{buildroot}%{python_sitearch}/gpg-*.egg-info -delete -print
find %{buildroot}%{python_sitearch}/gpg -type f -name "*.pyc" -delete -print
rm -v %{buildroot}%{python_sitelib}/gpg/install_files.txt
%endif # with_python2
%if 0%{with_python3}
rm -vf %{buildroot}%{python_sitelib}/gpg/install_files.txt
find %{buildroot}%{python3_sitearch}/gpg-*.egg-info -delete -print
rm -v %{buildroot}%{python3_sitelib}/gpg/install_files.txt
rm -vf %{buildroot}%{python3_sitelib}/gpg/install_files.txt
find %{buildroot}%{python3_sitearch}/gpg -type f -name "*.pyc" -delete -print
%endif # with_python3
%check
%if ! 0%{?qemu_user_space_build}
@ -238,21 +207,18 @@ make %{?_smp_mflags} check
%post -n libgpgme11 -p /sbin/ldconfig
%postun -n libgpgme11 -p /sbin/ldconfig
%if 0%{with_cpp}
%post -n libgpgmepp6 -p /sbin/ldconfig
%postun -n libgpgmepp6 -p /sbin/ldconfig
%endif # with_cpp
%if 0%{with_qt}
%post -n libqgpgme7 -p /sbin/ldconfig
%postun -n libqgpgme7 -p /sbin/ldconfig
%endif # with_qt
%post
%install_info --info-dir=%{_infodir} %{_infodir}/gpgme.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gpgme.info%{ext_info}
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gpgme.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gpgme.info%{ext_info}
%files
%defattr(-,root,root)
@ -273,7 +239,6 @@ make %{?_smp_mflags} check
%{_datadir}/aclocal/gpgme.m4
%{_includedir}/gpgme.h
%if 0%{with_cpp}
%files -n libgpgmepp6
%defattr(-,root,root)
%{_libdir}/libgpgmepp.so.*
@ -285,21 +250,14 @@ make %{?_smp_mflags} check
%dir %{_libdir}/cmake
%dir %{_libdir}/cmake/Gpgmepp
%{_libdir}/cmake/Gpgmepp/GpgmeppConfig*.cmake
%endif # with_cpp
%if 0%{with_python2}
%files -n python-gpg
%defattr(-,root,root)
%{python_sitelib}/gpg
%{python_sitearch}/gpg
%endif # with_python2
%if 0%{with_python3}
%files -n python3-gpg
%defattr(-,root,root)
%{python3_sitelib}/gpg
%{python3_sitearch}/gpg
%endif # with_python3
%if 0%{with_qt}
%files -n libqgpgme7