%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

%define glib2_version 2.40.0
%define dbus_version 1.6.14
%define eggdbus_version 0.6
%define gcrypt_version 1.4.6

Summary: Framework for managing passwords and other secrets
Name: libgnome-keyring
Version: 3.12.0
Release: 1%{?_dist_release}
License: GPLv2+ and LGPLv2+
Group: System Environment/Libraries
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.12/%{name}-%{version}.tar.xz
URL: http://live.gnome.org/GnomeKeyring
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: eggdbus-devel >= %{eggdbus_version}
BuildRequires: libgcrypt-devel >= %{gcrypt_version}
BuildRequires: gobject-introspection-devel
BuildRequires: intltool
Conflicts: gnome-keyring < 2.29.4

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
gnome-keyring is a program that keep password and other secrets for
users. The library libgnome-keyring is used by applications to integrate
with the gnome-keyring system.

%package devel
Summary: Development files for libgnome-keyring
License: LGPLv2+
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel
Requires: pkgconfig
Requires: gtk-doc
Conflicts: gnome-keyring-devel < 2.29.4

%description devel
The libgnome-keyring-devel package contains the libraries and
header files needed to develop applications that use libgnome-keyring.


# compat32
%package -n compat32-%{name}
Summary: Framework for managing passwords and other secrets
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description -n compat32-%{name}
gnome-keyring is a program that keep password and other secrets for
users. The library libgnome-keyring is used by applications to integrate
with the gnome-keyring system.


%package -n compat32-%{name}-devel
Summary: Development files for libgnome-keyring
License: LGPLv2+
Group: Development/Libraries
Requires: compat32-%{name} = %{version}-%{release}
Requires: compat32-glib2-devel
Conflicts: compat32-gnome-keyring-devel < 2.29.4

%description -n compat32-%{name}-devel
The libgnome-keyring-devel package contains the libraries and
header files needed to develop applications that use libgnome-keyring.


%prep
%setup -q -n libgnome-keyring-%{version}

%build
%configure \
	--disable-gtk-doc \
	--enable-introspection


make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%find_lang libgnome-keyring

%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n compat32-%{name} -p /sbin/ldconfig

%postun -n compat32-%{name} -p /sbin/ldconfig


%files -f libgnome-keyring.lang
%defattr(-, root, root, -)
%doc AUTHORS NEWS README COPYING HACKING
%{_libdir}/lib*.so.*
%{_libdir}/girepository-1.0/GnomeKeyring-1.0.typelib

%files devel
%defattr(-, root, root, -)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/gir-1.0/GnomeKeyring-1.0.gir
%doc %{_datadir}/gtk-doc/html/gnome-keyring/

# compat32
%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-, root, root, -)
%{_libdir}/lib*.so.*

%files -n compat32-%{name}-devel
%defattr(-, root, root, -)
%{_libdir}/lib*.so
%endif

%changelog
* Sat Mar 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 3.12.0-1
- new upstream release

* Wed Feb 19 2014 NAKAMURA Kenta <kenta@vinelinux.org> - 3.10.1-3
- rebuilt with libgcrypt-1.6

* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 3.10.1-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 3.10.1-1
- new upstream release

* Wed Apr 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 3.8.0-1
- new upstream release
- add BuildRequires: gobject-introspection-devel

* Thu Sep 27 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

* 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

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 3.1.4-1
- new upstream release

* Sat Oct 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.32.0-1
- new upstream release

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

* Wed Mar 31 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
- initial build for Vine Linux


* Mon Mar 22 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.92-git20100322.1
- Update to a new git snapshot

* Wed Mar 17 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.92-git20100317.1
- Update to 2.29.92 git snapshot

* Wed Feb 17 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.4-4
- When no password is found, return GNOME_KEYRING_RESULT_NO_MATCH

* Tue Feb 16 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.4-3
- Fix assertion when password is not found

* Mon Jan 25 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.4-2
- Fix assertion calling deprecated acl function
- Clear the client's session when the service disconnects
- Implement setting of Type property in gnome_keyring_item_set_info()

* Thu Jan  7 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.29.4-1
- Initial packaging