%global svn_rev 115768
%define mono_dir %{_prefix}/lib/mono
%define monodoc_dir %{_prefix}/lib/monodoc

Name:           gnome-keyring-sharp
Version:        1.0.1
Release:        3.%{svn_rev}svn%{?_dist_release}
Summary:        Mono implementation of GNOME Keyring
Summary(ja):	GNOME Keyring の Mono による実装
Group:          System Environment/Libraries
License:        MIT
URL:            http://www.mono-project.com/Libraries#Gnome-KeyRing-Sharp
# Tarfile created from svn snapshot
# svn co -r %{svn-rev} \
#   svn://anonsvn.mono-project.com/source/trunk/gnome-keyring-sharp \
#   gnome-keyring-sharp-%{version}
# tar cjf gnome-keyring-sharp-%{version}-r%{svn_rev}.tar.bz2 --exclude=.svn \
#   gnome-keyring-sharp-%{version}
Source0:        gnome-keyring-sharp-%{version}-r%{svn_rev}.tar.bz2
Patch0:         gnome-keyring-sharp-libdir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  autoconf automake
BuildRequires:  mono-devel ndesk-dbus monodoc

Packager:	kazutaka

%description
gnome-keyring-sharp is a fully managed implementation of libgnome-keyring.

When the gnome-keyring-daemon is running, you can use this to retrive/store
confidential information such as passwords, notes or network services user
information.


%package        devel
Summary:        Development files for %{name}
Summary(ja):     %{name} の開発用ファイル
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        doc
Summary:        Documentation for %{name}
Summary(ja):     %{name} のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
Requires:       monodoc

%description    doc
The %{name}-doc package contains documentation for %{name}.


%prep
%setup -q
%patch0 -p1 -b .libdir


%build
aclocal
automake -a
autoreconf
##%configure --disable-static
%configure --disable-static --libdir=%{_prefix}/lib
make
# sharing violation when doing parallel build
#%{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
##make install DESTDIR=$RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT pkgconfigdir=%{_libdir}/pkgconfig
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
##%{_libdir}/mono/gnome-keyring-sharp-1.0
##%{_libdir}/mono/gac/Gnome.Keyring
%{mono_dir}/gnome-keyring-sharp-1.0
%{mono_dir}/gac/Gnome.Keyring

%files devel
%defattr(-,root,root,-)
#doc 
%{_libdir}/pkgconfig/%{name}-1.0.pc

%files doc
%defattr(-,root,root,-)
##%{_libdir}/monodoc/sources/Gnome.Keyring.*
%{monodoc_dir}/sources/Gnome.Keyring.*


%changelog
* Fri Jul 10 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.1-3.115768svn
- rebuild with latest rpm to update mono-dependencies

* Sat Jun 13 2009 Shu KONNO <owa@bg.wakwak.com> 1.0.1-2.115768svn
- added mono_dir, monodoc_dir macros
- added --libdir=%%{_prefix}/lib option to %%configure
- added pkgconfigdir=%%{_libdir}/pkgconfig option to make install

* Thu Jun 11 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.1-1.115768svn
- initial build for Vine Linux based on fedora development

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-0.2.115768svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 29 2009 Michel Salim <salimma@fedoraproject.org> - 1.0.1-0.1.115768svn%{?dist}
- Update to r115768

* Mon Jul 14 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.0.0-0.2.87622svn%{?dist}
- Disable creation of -debuginfo subpackage

* Sun Jul  6 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.0.0-0.1.87622svn%{?dist}
- Initial package
