diff --git a/gpgme-1.3.2-config_extras.patch b/gpgme-1.3.2-config_extras.patch deleted file mode 100644 index 6cfc4bb..0000000 --- a/gpgme-1.3.2-config_extras.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up gpgme-1.3.2/src/gpgme-config.in.config_extras gpgme-1.3.2/src/gpgme-config.in ---- gpgme-1.3.2/src/gpgme-config.in.config_extras 2012-05-02 10:42:23.000000000 +0200 -+++ gpgme-1.3.2/src/gpgme-config.in 2012-09-26 10:03:41.904413540 +0200 -@@ -22,22 +22,22 @@ cflags="-I@includedir@" - libs="-L@libdir@" - - # Network libraries. --assuan_cflags="@LIBASSUAN_CFLAGS@" --assuan_libs="@LIBASSUAN_LIBS@" -+#assuan_cflags="@LIBASSUAN_CFLAGS@" -+#assuan_libs="@LIBASSUAN_LIBS@" - - # Configure libgpg-error. - gpg_error_cflags="@GPG_ERROR_CFLAGS@" --gpg_error_libs="@GPG_ERROR_LIBS@" -+#gpg_error_libs="@GPG_ERROR_LIBS@" - - # Configure thread packages. - thread_modules="" - - @HAVE_PTHREAD_TRUE@thread_modules="$thread_modules pthread" --libs_pthread="-lpthread" -+#libs_pthread="-lpthread" - cflags_pthread="" - - # Configure glib. --libs_glib="@GLIB_LIBS@" -+#libs_glib="@GLIB_LIBS@" - cflags_glib="@GLIB_CFLAGS@" - with_glib= - diff --git a/gpgme-1.7.0-confix_extras.patch b/gpgme-1.7.0-confix_extras.patch new file mode 100644 index 0000000..e6082f0 --- /dev/null +++ b/gpgme-1.7.0-confix_extras.patch @@ -0,0 +1,19 @@ +diff -uNr gpgme-1.7.0.orig/src/gpgme-config.in gpgme-1.7.0/src/gpgme-config.in +--- gpgme-1.7.0.orig/src/gpgme-config.in 2016-09-21 14:58:05.420362491 +0200 ++++ gpgme-1.7.0/src/gpgme-config.in 2016-09-21 15:02:04.156591953 +0200 +@@ -22,12 +22,12 @@ + libs="-L@libdir@" + + # Network libraries. +-assuan_cflags="@LIBASSUAN_CFLAGS@" +-assuan_libs="@LIBASSUAN_LIBS@" ++#assuan_cflags="@LIBASSUAN_CFLAGS@" ++#assuan_libs="@LIBASSUAN_LIBS@" + + # Configure libgpg-error. + gpg_error_cflags="@GPG_ERROR_CFLAGS@" +-gpg_error_libs="@GPG_ERROR_LIBS@" ++#gpg_error_libs="@GPG_ERROR_LIBS@" + + # Configure thread packages. + thread_modules="" diff --git a/gpgme.spec b/gpgme.spec index 69f9e95..29756f9 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,29 +1,25 @@ # trim changelog included in binary rpms %global _changelog_trimtime %(date +%s -d "1 year ago") -# STATUS_KEY_CONSIDERED from Patch101 has been added in 2.1.13 +# STATUS_KEY_CONSIDERED has been added in 2.1.13 %global gnupg2_min_ver 2.1.13 # GPG_ERR_SUBKEYS_EXP_OR_REV has been added in 1.23 %global libgpg_error_min_ver 1.23 Name: gpgme Summary: GnuPG Made Easy - high level crypto API -Version: 1.6.0 -Release: 3%{?dist} +Version: 1.7.0 +Release: 1%{?dist} License: LGPLv2+ URL: http://www.gnupg.org/related_software/gpgme/ Source0: ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-%{version}.tar.bz2 Source2: gpgme-multilib.h -Patch1: gpgme-1.3.2-config_extras.patch - +# Don't add extra libs/cflags in gpgme-config +Patch0: gpgme-1.7.0-confix_extras.patch # add -D_FILE_OFFSET_BITS... to gpgme-config, upstreamable -Patch3: gpgme-1.3.2-largefile.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1359521 -# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=315fb73d4a774e2c699ac1804f5377559b4d0027 -Patch101: 0001-Return-dedicated-error-code-for-all-subkeys-expired-.patch +Patch1: gpgme-1.3.2-largefile.patch BuildRequires: gcc BuildRequires: gawk @@ -34,6 +30,9 @@ BuildRequires: libgpg-error-devel >= %{libgpg_error_min_ver} BuildRequires: pth-devel BuildRequires: libassuan-devel >= 2.0.2 +# For python bindings +BuildRequires: swig + # to remove RPATH BuildRequires: chrpath @@ -61,6 +60,23 @@ Requires(postun): /sbin/install-info %description devel %{summary}. +%package -n python2-%{name} +Summary: %{name} bindings for Python 2 +%{?python_provide:%python_provide python2-%{name}} +BuildRequires: python2-devel +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} + +%description -n python2-%{name} +%{summary}. + +%package -n python3-%{name} +Summary: %{name} bindings for Python 3 +%{?python_provide:%python_provide python3-%{name}} +BuildRequires: python3-devel +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release} + +%description -n python3-%{name} +%{summary}. %prep %autosetup -p1 @@ -73,12 +89,24 @@ sed -i -e 's|^libdir=@libdir@$|libdir=@exec_prefix@/lib|g' src/gpgme-config.in sed -i -e 's|GPG = gpg|GPG = gpg2|' tests/gpg/Makefile.{in,am} %build -%configure --disable-static --disable-silent-rules --with-gpg=%{_bindir}/gpg2 +%configure --disable-static --disable-silent-rules --with-gpg=%{_bindir}/gpg2 --enable-languages=no %make_build +# Build python bindings +%global optflags %{optflags} -I%{_builddir}/%{?buildsubdir} +pushd lang/python + %py2_build + %py3_build +popd + %install %make_install +pushd lang/python + %py2_install + %py3_install +popd + # unpackaged files rm -fv %{buildroot}%{_infodir}/dir rm -fv %{buildroot}%{_libdir}/lib*.la @@ -105,7 +133,6 @@ make check %postun -p /sbin/ldconfig %files -%{!?_licensedir:%global license %%doc} %license COPYING* %doc AUTHORS ChangeLog NEWS README* THANKS TODO VERSION %{_libdir}/lib%{name}.so.11* @@ -131,7 +158,18 @@ fi %{_datadir}/aclocal/gpgme.m4 %{_infodir}/gpgme.info* +%files -n python2-%{name} +%{python2_sitearch}/pyme3-*.egg-info +%{python2_sitearch}/pyme/ + +%files -n python3-%{name} +%{python3_sitearch}/pyme3-*.egg-info +%{python3_sitearch}/pyme/ + %changelog +* Wed Sep 21 2016 Igor Gnatenko - 1.7.0-1 +- Update to 1.7.0 + * Mon Jul 25 2016 Igor Gnatenko - 1.6.0-3 - Set min ver for libgpg-error diff --git a/sources b/sources index c6a5b13..4ca2311 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -43b333f8860b031570e406c95e1bb5b4 gpgme-1.6.0.tar.bz2.sig -60d730d22e8065fd5de309e8b98e304b gpgme-1.6.0.tar.bz2 +c3f24c50bc5bdb7b898da0e278425ad2 gpgme-1.7.0.tar.bz2