#
# spec file for package seahorse
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           seahorse
Version:        3.30
Release:        0
Summary:        GNOME interface for gnupg
License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND GFDL-1.1-only
Group:          Productivity/Security
URL:            http://projects.gnome.org/seahorse/
Source:         http://download.gnome.org/sources/seahorse/3.30/%{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  gpg2
BuildRequires:  libgpgme-devel
BuildRequires:  meson
BuildRequires:  openldap2-devel
BuildRequires:  openssh
BuildRequires:  pkcs11-helper-devel
BuildRequires:  pkgconfig
BuildRequires:  translation-update-upstream
BuildRequires:  vala
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(avahi-client)
BuildRequires:  pkgconfig(avahi-glib) >= 0.6
BuildRequires:  pkgconfig(gcr-3) >= 3.11.91
BuildRequires:  pkgconfig(gcr-ui-3) >= 3.11.91
BuildRequires:  pkgconfig(gio-2.0) >= 2.44
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.44
BuildRequires:  pkgconfig(glib-2.0) >= 2.44
BuildRequires:  pkgconfig(gmodule-2.0) >= 2.44
BuildRequires:  pkgconfig(gobject-2.0) >= 2.44
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.22
BuildRequires:  pkgconfig(libsecret-1) >= 0.16
BuildRequires:  pkgconfig(libsoup-2.4) >= 2.33.92
Obsoletes:      %{name}-devel < %{version}

%description
Seahorse is a GNOME interface for gnupg. It uses gpgme as the backend.

%package -n gnome-shell-search-provider-seahorse
Summary:        GNOME interface for gnupg -- Search Provider for GNOME Shell
Group:          Productivity/Security
Supplements:    packageand(gnome-shell:%{name})

%description -n gnome-shell-search-provider-seahorse
Seahorse is a GNOME interface for gnupg. It uses gpgme as the backend.

This package contains a search provider to enable GNOME Shell to get
search results from seahorse.

%lang_package

%prep
%autosetup -p1
translation-update-upstream

%build
%meson \
    -Dpgp-support=true \
    -Dcheck-compatible-gpg=true \
    -Dpkcs11-support=true \
    -Dkeyservers-support=true \
    -Dhkp-support=true \
    -Dldap-support=true \
    -Dkey-sharing=true \
    %{nil}
%meson_build

%check
%meson_test

%install
%meson_install
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}%{_datadir}

%files
%license COPYING COPYING-DOCS COPYING.LIB
%doc AUTHORS NEWS README.md
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/seahorse
%{_libexecdir}/seahorse/
%{_datadir}/metainfo/seahorse.appdata.xml
%{_datadir}/applications/seahorse.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.seahorse.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.seahorse.manager.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.seahorse.window.gschema.xml
%{_datadir}/icons/hicolor/*/*/seahorse*
%{_datadir}/seahorse/
%{_mandir}/man1/seahorse.1%{?ext_man}

%files -n gnome-shell-search-provider-seahorse
%{_datadir}/dbus-1/services/org.gnome.seahorse.Application.service
%dir %{_datadir}/gnome-shell
%dir %{_datadir}/gnome-shell/search-providers
%{_datadir}/gnome-shell/search-providers/seahorse-search-provider.ini

%files lang -f %{name}.lang

%changelog