File gnome-keyring.spec of Package gnome-keyring.536

#
# spec file for package gnome-keyring
#
# Copyright (c) 2012 SUSE LINUX Products 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 http://bugs.opensuse.org/
#


Name:           gnome-keyring
Version:        3.2.1
Release:        0
Url:            http://www.gnome.org/
Summary:        GNOME Keyring
License:        GPL-2.0+ ; LGPL-2.1+
Group:          System/GUI/GNOME
Source:         http://download.gnome.org/sources/gnome-keyring/3.2/%{name}-%{version}.tar.bz2
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM gnome-keyring-remove-xfce-lxde-autostart.patch bnc#710038 bgo#660240 gber@opensuse.org -- Do not start the gnome-keyring daemon for LXDE or Xfce via XDG autostart, that only works with gnome-session
Patch0:         gnome-keyring-remove-xfce-lxde-autostart.patch
# PATCH-FEATURE-OPENSUSE gnome-keyring-check-session.patch vuntz@novell.com -- Only start gnome-keyring in the pam module if GNOME, Xfce or LXDE is started
Patch4:         gnome-keyring-check-session.patch
# PATCH-FIX-OPENSUSE gnome-keyring-pam-auth-prompt-password.patch bnc466732 bgo560488 vuntz@novell.com -- Make the pam module prompt the password in auth, so we can use pam-config. This is a workaround until bnc#477488 is implemented.
Patch5:         gnome-keyring-pam-auth-prompt-password.patch
BuildRequires:  ca-certificates
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  libcap-ng-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libselinux-devel
BuildRequires:  pam-devel
# We need the %%mime_database_* macros
BuildRequires:  shared-mime-info
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libtasn1)
BuildRequires:  pkgconfig(p11-kit-1) >= 0.6
%if 0%{?BUILD_FROM_VCS}
BuildRequires:  gnome-common
BuildRequires:  gtk-doc
%endif
PreReq:         permissions
Requires:       libgck-modules = %{version}
Recommends:     %{name}-lang
Recommends:     %{name}-pam
# bug437293
%ifarch ppc64
Obsoletes:      gnome-keyring-64bit
%endif
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
The GNOME Keyring is a daemon in the session, similar to ssh-agent,
and other applications can use it to store passwords and other
sensitive information.

The program can manage several keyrings, each with its own master
password, and there is also a session keyring which is never stored to
disk, but forgotten when the session ends.

%package -n libgcr-3-1
Summary:        Library for Crypto UI related task
Group:          System/GUI/GNOME
Recommends:     %{name} = %{version}

%description -n libgcr-3-1
GCR is a library for crypto UI and related tasks.

%package -n libgcr-devel
Summary:        Library for Crypto UI related task - Development Files
Group:          Development/Libraries/GNOME
Requires:       libgcr-3-1 = %{version}

%description -n libgcr-devel
The GNOME Keyring is a daemon in the session, similar to ssh-agent,
and other applications can use it to store passwords and other
sensitive information.

The program can manage several keyrings, each with its own master
password, and there is also a session keyring which is never stored to
disk, but forgotten when the session ends.

%package -n libgck-1-0
Summary:        GObject bindings for PKCS#11
Group:          System/GUI/GNOME
Recommends:     libgck-modules = %{version}

%description -n libgck-1-0
GCK is a wrapper based on GLib implementing the PKCS#11 (Cryptoki)
interface.

%package -n libgck-devel
Summary:        GObject bindings for PKCS#11 - Development Files
Group:          Development/Libraries/GNOME
Requires:       libgck-1-0 = %{version}

%description -n libgck-devel
The GNOME Keyring is a daemon in the session, similar to ssh-agent,
and other applications can use it to store passwords and other
sensitive information.

The program can manage several keyrings, each with its own master
password, and there is also a session keyring which is never stored to
disk, but forgotten when the session ends.

%package -n libgck-modules
Summary:        Glib wrapper library for PKCS#11 - Modules
Group:          System/GUI/GNOME
Requires:       libgck-1-0 = %{version}
# libgp11 used to be the library providing all this. It turns out the
# modules are, as of 2.91.3, installed in the same place
Obsoletes:      libgp11-modules < %{version}

%description -n libgck-modules
GCK is a wrapper based on GLib implementing the PKCS#11 (Cryptoki)
interface.

This package contains various PKCS#11 modules, to expose keys and
certificates from different sources.

%package -n p11-kit-module-gnome-keyring
Summary:        PKCS#11 Module for GNOME Keyring
Group:          System/Libraries
Requires:       gnome-keyring
Supplements:    packageand(gnome-keyring:libp11-kit0)

%description -n p11-kit-module-gnome-keyring
This module allows programs using p11-kit to access information
stored in GNOME Keyring.

%package pam
Summary:        GNOME Keyring - PAM module
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}
PreReq:         pam-config >= 0.72
PreReq:         sed
# Package was present in OpenSUSE 10.2 and 10.3:
Provides:       pam_keyring = 0.0.8
Obsoletes:      pam_keyring < 0.0.8

%description pam
The GNOME Keyring is a daemon in the session, similar to ssh-agent,
and other applications can use it to store passwords and other
sensitive information.

The program can manage several keyrings, each with its own master
password, and there is also a session keyring which is never stored to
disk, but forgotten when the session ends.

The PAM module can be used to unlock the keyring on login.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch4 -p1
%patch5 -p1

%if 0%{?BUILD_FROM_VCS}
[ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh
%endif

%build
%configure\
        --enable-pam \
        --with-pam-dir=/%{_lib}/security \
%if 0%{?BUILD_FROM_VCS}
        --enable-gtk-doc \
%endif
        --with-root-certs=%{_sysconfdir}/ssl/certs \
        --disable-update-mime
make %{?jobs:-j%jobs} V=1

%install
%makeinstall
# we don't want to ship a test module
rm %{buildroot}/%{_libdir}/libmock-test-module.so
find %{buildroot} -type f -name "*.la" -delete -print
# XFCE team wants gnome-keyring to work by default.
for i in %{buildroot}%{_sysconfdir}/xdg/autostart/*.desktop ; do
 desktop-file-install --dir=%{buildroot}%{_sysconfdir}/xdg/autostart --add-only-show-in=XFCE $i
done
%find_lang %{name}
%suse_update_desktop_file gcr-viewer
%suse_update_desktop_file gnome-keyring-gpg
%suse_update_desktop_file gnome-keyring-pkcs11
%suse_update_desktop_file gnome-keyring-prompt
%suse_update_desktop_file gnome-keyring-secrets
%suse_update_desktop_file gnome-keyring-ssh
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post
%set_permissions %{_bindir}/gnome-keyring-daemon
%glib2_gsettings_schema_post
%mime_database_post

%verifyscript
%verify_permissions -e %{_bindir}/gnome-keyring-daemon

%postun
%glib2_gsettings_schema_postun
%mime_database_postun

%post -n libgcr-3-1
/sbin/ldconfig
%icon_theme_cache_post

%postun -n libgcr-3-1
/sbin/ldconfig
%icon_theme_cache_postun

%post -n libgck-1-0 -p /sbin/ldconfig

%postun -n libgck-1-0 -p /sbin/ldconfig

###
# WARNING: when changing the pam-config calls in the scriptlets, please also
# update them in baselibs.conf.
# pam-config checks if the pam module is available for 32bit too if pam-32bit
# is installed, so the call here might fail until gnome-keyring-pam-32bit gets
# installed (see bnc#728586).
###

%post pam
%{_sbindir}/pam-config -a --gnome_keyring --gnome_keyring-auto_start --gnome_keyring-only_if=gdm,gdm-password,lxdm,lightdm || true
# Remove leftover from the old way, before we used pam-config. We start
# cleaning up in 11.2, so this can be removed in 12.2.
# Note: this can safely be done after pam-config, since pam-config doesn't
# touch /etc/pam.d/gdm
if test -f etc/pam.d/gdm; then
if fgrep -q pam_gnome_keyring.so etc/pam.d/gdm ; then
  sed -i '/ pam_gnome_keyring\.so/d' etc/pam.d/gdm
fi
fi

%postun pam
if [ "$1" == "0" ]; then
  %{_sbindir}/pam-config -d --gnome_keyring || true
fi

%files
%defattr (-, root, root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/gnome-keyring
%{_bindir}/gnome-keyring-3
%{_bindir}/gnome-keyring-daemon
%{_libexecdir}/gnome-keyring-prompt
%{_libexecdir}/gnome-keyring-prompt-3
%config %{_sysconfdir}/pkcs11/modules/gnome-keyring-module
%{_datadir}/dbus-1/services/org.freedesktop.secrets.service
%{_datadir}/dbus-1/services/org.gnome.keyring.service
%dir %{_datadir}/gnome-keyring-3
%dir %{_datadir}/gnome-keyring-3/ui
%{_datadir}/gnome-keyring-3/ui/gku-prompt.ui
# Own the directory since we can't depend on gconf providing them
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/org.gnome.crypto.cache.convert
%{_datadir}/GConf/gsettings/org.gnome.crypto.pgp.convert
%{_datadir}/GConf/gsettings/org.gnome.crypto.pgp_keyservers.convert
%{_datadir}/applications/gnome-keyring-prompt.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.crypto.cache.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.crypto.pgp.gschema.xml
%{_sysconfdir}/xdg/autostart/*.desktop
# gcr-viewer
%{_bindir}/gcr-viewer
%{_datadir}/applications/gcr-viewer.desktop
%{_datadir}/mime/packages/gcr-crypto-types.xml

%files lang -f %{name}.lang

%files -n libgcr-3-1
%defattr (-, root, root)
%{_libdir}/libgcr-3.so.*
%{_datadir}/icons/hicolor/*/apps/gcr-key.png
%{_datadir}/icons/hicolor/*/apps/gcr-key-pair.png
%{_datadir}/gcr-3/

%files -n libgcr-devel
%defattr (-, root, root)
%{_libdir}/libgcr-3.so
%{_libdir}/pkgconfig/gcr-3.pc
%{_includedir}/gcr-3/
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/gcr-3/

%files -n libgck-1-0
%defattr (-, root, root)
%{_libdir}/libgck-1.so.*
%dir %{_libdir}/gnome-keyring
%dir %{_libdir}/gnome-keyring/devel

%files -n libgck-devel
%defattr (-, root, root)
%{_libdir}/libgck-1.so
%{_libdir}/pkgconfig/gck-1.pc
%{_includedir}/gck-1/
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/gck/

%files -n libgck-modules
%defattr (-, root, root)
# Note: if modules move to %%{_libdir}/pkcs11, then we should remove
# the libgp11-modules Obsoletes tag.
%{_libdir}/gnome-keyring/devel/gkm-gnome2-store-standalone.so
%{_libdir}/gnome-keyring/devel/gkm-roots-store-standalone.so
%{_libdir}/gnome-keyring/devel/gkm-secret-store-standalone.so
%{_libdir}/gnome-keyring/devel/gkm-ssh-store-standalone.so
%{_libdir}/gnome-keyring/devel/gkm-xdg-store-standalone.so

%files -n p11-kit-module-gnome-keyring
%defattr (-, root, root)
%dir %{_libdir}/pkcs11
%{_libdir}/pkcs11/gnome-keyring-pkcs11.so

%files pam
%defattr (-, root, root)
%attr(555,root,root) /%{_lib}/security/*.so

%changelog
openSUSE Build Service is sponsored by