%define gtk3_version 3.6.0

Summary: A framework for managing user passwords and other secrets
Summary(ja): ユーザのパスワードや秘匿情報を管理するためのフレームワーク
Name: gnome-keyring
Version: 3.6.3
Release: 1%{?_dist_release}
License: GPL/LGPL
Group: System Environment/Libraries
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.6/%{name}-%{version}.tar.xz
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: gtk3 >= %{gtk3_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: dbus-devel >= 1.0
BuildRequires: gettext
BuildRequires: libcap-ng-devel
BuildRequires: libgcrypt-devel
BuildRequires: libtasn1-devel
BuildRequires: openssl-devel
BuildRequires: gcr-devel
BuildRequires: pam-devel
BuildRequires: autoconf, automake, libtool
BuildRequires: intltool
BuildRequires: perl(XML::Parser)

Patch2: %{name}-2.31.91-configure-vine.patch

Vendor: Project Vine
Distribution: Vine Linux

%description
gnome-keyring manages passwords and other types of secrets
for the user, storing them encrypted with a main password.
Applications can use the gnome-keyring library to integrate
with the keyring.

%package pam
Summary: A pam module for unlocking keyrings at login time
License: LGPLv2+
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
# for /lib/security
Requires: pam

%description pam
The gnome-keyring-pam package contains a pam module that can
automatically unlock the "login" keyring when the user logs in 
and start the keyring daemon.


%prep
%setup -q -n gnome-keyring-%{version}
%patch2 -p1 -b .vine

%build
%configure \
	--with-gtk=3.0 \
	--disable-gtk-doc \
	--disable-update-mime \
	--enable-pam \
	--with-pam-dir=/%{_lib}/security \
	--with-root-certs=%{_datadir}/ssl/certs 

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install install-pam DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/pam_gnome_keyring.so

%find_lang %{name}

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-keyring/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-keyring/*/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/*.la
rm -f $RPM_BUILD_ROOT/%{_lib}/security/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
update-mime-database %{_datadir}/mime > /dev/null || :


%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
	glib-compile-schemas %{_datadir}/glib-2.0/schemas
	gtk-update-icon-cache -q %{_datadir}/icons/hicolor
	update-mime-database %{_datadir}/mime > /dev/null || :
fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas


%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS NEWS README COPYING COPYING.LIB
%{_sysconfdir}/xdg/autostart/gnome-keyring-pkcs11.desktop
%{_sysconfdir}/xdg/autostart/gnome-keyring-secrets.desktop
%{_sysconfdir}/xdg/autostart/gnome-keyring-ssh.desktop
%{_sysconfdir}/xdg/autostart/gnome-keyring-gpg.desktop
%{_sysconfdir}/pkcs11/modules/gnome-keyring.module
%{_bindir}/*
%dir %{_libdir}/gnome-keyring
%{_libdir}/gnome-keyring/devel/*.so
%{_libdir}/pkcs11/gnome-keyring-pkcs11.so
%{_datadir}/dbus-1/services/*
%{_datadir}/GConf/gsettings/*
%{_datadir}/glib-2.0/schemas/*

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


%changelog
* Sun Mar 03 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.3-1
- new upstream release

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release

* Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Fri Sep 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release
- remove BuildRequires: p11-kit-devel
- add BuildRequires: gcr-devel
- remove devel sub package
- remove compat32 sub packages

* Wed Nov 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Thu Oct 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Wed Sep 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release
- remove Patch3

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- add BuildRequires: openssl-devel, p11-kit-devel, libcap-ng-devel
- add Patch3 (gnome-keyring-3.1.4-git20110729.patch)

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1-1
- new upstream release

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release
- add configure option (--enable-pam)
- remove configure option (--disable-schemas-install)
- add Patch2 (%{name}-2.31.91-configure-vine.patch)

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 2.30.3-2
- build with rpm-4.8.1-1 for pkg-config file

* Sat Jun 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.3-1
- new upstream release

* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- new upstream release

* Wed Mar 31 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release
- remove BuildRequires: hal-devel

* Sun Mar 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.2-1
- new upstream release
- add BuildRequires: GConf2-devel

* Sat Oct 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.1-1
- new upstream release

* Sun Jul 12 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.26.3-2
- added compat32 package for x86_64 arch support

* Sat Jul 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.3-1
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-1
- new upstream release

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- new upstream release

* Wed Oct 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.1-1
- new upstream release

* Tue Sep 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release

* Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.2-1
- new upstream release

* Wed Apr  9 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.1-1vl5
- new upstream release

* Sat Mar 22 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.0-1vl5
- new upstream release
- added BuildRequires: libtasn1-devel

* Tue Dec 11 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.20.2-0vl1
- new upstream release
- added a pam subpackage

* Fri Apr 27 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.1-0vl1
- new upstream release

* Tue May 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.9-0vl1
- new upstream release

* Mon Mar 06 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.8-0vl1
- new upstream release

* Sat Oct 08 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.5-0vl1
- new upstream release

* Wed Sep 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.4-0vl1
- new upstream release

* Fri Mar 25 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.2-0vl1
- new upstream version

* Sun Dec 12 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.4.0-0vl1
- new upstream release

* Sun Aug 01 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.3.2-0vl1
- initial build for Vine Linux based on fedora's spec file.

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Thu Apr  1 2004 Alex Larsson <alexl@redhat.com> 0.2.0-1
- update to 0.2.0

* Wed Mar 10 2004 Alexander Larsson <alexl@redhat.com> 0.1.90-1
- update to 0.1.90

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Feb 24 2004 Alexander Larsson <alexl@redhat.com> 0.1.4-1
- update to 0.1.4

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Jan 30 2004 Alexander Larsson <alexl@redhat.com> 0.1.3-1
- update to 0.1.3

* Mon Jan 26 2004 Bill Nottingham <notting@redhat.com>
- tweak summary

* Mon Jan 26 2004 Alexander Larsson <alexl@redhat.com> 0.1.2-2
- devel package only needs glib2-devel, not gtk2-devel

* Fri Jan 23 2004 Alexander Larsson <alexl@redhat.com> 0.1.2-1
- First version
