2 Commits

4 changed files with 108 additions and 9 deletions

65
fix-configure-gpgme.patch Normal file
View File

@@ -0,0 +1,65 @@
Index: libcryptui-3.12.2/configure.ac
===================================================================
--- libcryptui-3.12.2.orig/configure.ac
+++ libcryptui-3.12.2/configure.ac
@@ -95,7 +95,7 @@ AC_ARG_ENABLE(gpg-check,
DO_CHECK=$enableval, DO_CHECK=yes)
if test "$DO_CHECK" = "yes"; then
- accepted_versions="1.2 1.4 2.0"
+ accepted_versions="1.2 1.4 2.0 2.1 2.2 2.3 2.4 2.5"
AC_PATH_PROGS(GNUPG, [gpg gpg2], no)
AC_DEFINE_UNQUOTED(GNUPG, "$GNUPG", [Path to gpg executable.])
ok="no"
@@ -128,50 +128,7 @@ if test "$DO_CHECK" = "yes"; then
fi
fi
-ok="no"
-min_gpgme_version=1.0.0
-AC_PATH_PROG(GPGME_CONFIG, gpgme-config, "failed")
-if test $GPGME_CONFIG != "failed" ; then
- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
- req_major=`echo $min_gpgme_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
- req_minor=`echo $min_gpgme_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
- req_micro=`echo $min_gpgme_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
- gpgme_config_version=`$GPGME_CONFIG --version`
- major=`echo $gpgme_config_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
- minor=`echo $gpgme_config_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
- micro=`echo $gpgme_config_version | \
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
-
- if test "$major" -eq "$req_major"; then
- if test "$minor" -ge "$req_minor"; then
- if test "$micro" -ge "$req_micro"; then
- ok="yes"
- fi
- fi
- fi
-fi
-
-if test $ok = "yes"; then
- GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
- GPGME_LIBS=`$GPGME_CONFIG --libs`
- AC_MSG_RESULT(yes)
- have_gpgme="$gpgme_config_version"
-else
- AC_MSG_RESULT(no)
-fi
-
-if test -z "$have_gpg"; then
- AC_MSG_ERROR([Appropriate version of GnuPG not found. Please install one of versions: $accepted_versions])
-fi
-
-if test -z "$have_gpgme"; then
- AC_MSG_ERROR(GPGME $min_gpgme_version or later needed)
-fi
+PKG_CHECK_MODULES(GPGME, gpgme)
SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GPGME_CFLAGS"
SEAHORSE_LIBS="$SEAHORSE_LIBS $GPGME_LIBS"

12
gpgme-2.0.patch Normal file
View File

@@ -0,0 +1,12 @@
diff --git a/daemon/seahorse-gpgme-operation.c b/daemon/seahorse-gpgme-operation.c
index 47356d64..2a8c2378 100644
--- a/daemon/seahorse-gpgme-operation.c
+++ b/daemon/seahorse-gpgme-operation.c
@@ -302,7 +302,6 @@ event_cb (void *data, gpgme_event_io_t type, void *type_data)
break;
case GPGME_EVENT_NEXT_KEY:
- case GPGME_EVENT_NEXT_TRUSTITEM:
default:
/* Ignore unsupported event types */
break;

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jun 14 20:41:07 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
- Fix build with gpgme >= 2 boo#1244605 fix-configure-gpgme.patch
- convert GnuPG 2.5.x support into gpgme-2.0.patch
-------------------------------------------------------------------
Thu Oct 24 06:55:28 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -2,6 +2,7 @@
# spec file for package libcryptui
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,22 +24,32 @@ Release: 0
Summary: Library for prompting for PGP keys
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Productivity/Security
URL: http://projects.gnome.org/seahorse/
URL: https://projects.gnome.org/seahorse/
Source: http://download.gnome.org/sources/libcryptui/3.12/%{name}-%{version}.tar.xz
# adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/libcryptui/-/blob/main/fix-configure-gpgme.patch?ref_type=heads
Patch0: fix-configure-gpgme.patch
# taken from https://gitlab.archlinux.org/archlinux/packaging/packages/libcryptui/-/blob/main/gpgme-2.0.patch?ref_type=heads
Patch1: gpgme-2.0.patch
BuildRequires: gobject-introspection-devel
BuildRequires: gpg2
BuildRequires: gpgme-devel
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gnome-keyring-1)
BuildRequires: pkgconfig(gpgme)
BuildRequires: pkgconfig(gthread-2.0) >= 2.32.0
BuildRequires: pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(sm)
# for Patch0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-tools
BuildRequires: gtk-doc
BuildRequires: libtool
#
%description
Libcryptui is a library used for prompting for PGP keys.
@@ -100,21 +111,21 @@ Libcryptui is a library used for prompting for PGP keys.
%lang_package
%prep
%setup -q
sed -i "s:1.2 1.4 2.0:1.2 1.4 2.0 2.1 2.2 2.3 2.4 2.5:" configure
%autosetup -p1
%build
# for Patch0
autoconf -i
%configure \
--disable-static
make %{?_smp_mflags} V=1
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang cryptui %{?no_lang_C}
%post -n libcryptui0 -p /sbin/ldconfig
%postun -n libcryptui0 -p /sbin/ldconfig
%ldconfig_scriptlets -n libcryptui0
%post -n libcryptui-data
%glib2_gsettings_schema_post
@@ -123,13 +134,16 @@ find %{buildroot} -type f -name "*.la" -delete -print
%glib2_gsettings_schema_postun
%files -n libcryptui0
%license COPYING
%doc AUTHORS ChangeLog COPYING-LIBCRYPTUI NEWS README
%{_libdir}/libcryptui.so.*
%files -n typelib-1_0-CryptUI-0_0
%license COPYING
%{_libdir}/girepository-1.0/CryptUI-0.0.typelib
%files -n libcryptui-data
%license COPYING
# Own the directory since we can't depend on gconf providing them
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
@@ -143,11 +157,13 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_datadir}/dbus-1/services/org.gnome.seahorse.service
%{_datadir}/cryptui/
%{_datadir}/pixmaps/cryptui/
%{_mandir}/man1/seahorse-daemon.1%{ext_man}
%{_mandir}/man1/seahorse-daemon.1%{?ext_man}
%files lang -f cryptui.lang
%license COPYING
%files devel
%license COPYING
%{_includedir}/libcryptui/
%{_libdir}/pkgconfig/cryptui-0.0.pc
%{_libdir}/libcryptui.so