%define         package_version 3.8.1
%define         package_release 1%{?_dist_release}

Name:           gnome-online-accounts
Version:        %{package_version}
Release:        %{package_release}
Summary:        GNOME applications and libraries to access the user's online accounts

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://www.clutter-project.org/
Source0:        http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.8/%{name}-%{version}.tar.xz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:	glib2-devel
BuildRequires:	gobject-introspection-devel
BuildRequires:	gtk3-devel
BuildRequires:	WebKit3-gtk-devel
BuildRequires:	json-glib-devel
BuildRequires:	gcr-devel
BuildRequires:	libsecret-devel
BuildRequires:	libnotify-devel
BuildRequires:	rest-devel
BuildRequires:	gtk-doc

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
Gnome-online-accounts provides interfaces so applications and
libraries in GNOME can access the user's online accounts

%package devel
Summary:        Development tools for gnome-online-accounts
Summary(ja):    gnome-online-accounts の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Requires:       gtk3-devel

%description devel
Header files and libraries for building a extension library for the
gnome-online-accounts.


%package        doc
Summary:        Documentation for gnome-online-accounts
Summary(ja):    gnome-online-accounts 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:	noarch


%description    doc
This package contains documentation for gnome-online-accounts.


%prep
%setup -q

%build
%configure \
	--enable-gtk-doc \
	--disable-static \
	--enable-flickr=yes \
	--enable-introspection=yes

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
#make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT install INSTALL="%{__install} -p -c"

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog AUTHORS COPYING NEWS README
%{_libdir}/*.so.*
%{_libexecdir}/goa-daemon
%{_libdir}/girepository-1.0/*.typelib
%{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service
%{_datadir}/%{name}/goawebview.css
%{_datadir}/icons/hicolor/*/apps/*.png
%{_mandir}/man8/goa-daemon.8.gz

%files devel
%defattr(-, root, root)
%{_includedir}/goa-1.0
%{_libdir}/*.so
%{_libdir}/goa-1.0/include/goaconfig.h
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir

%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/goa


%changelog
* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release

* Sun Mar 10 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

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- remove BuildRequires: libgnome-keyring-devel
- add BuildRequires: gcr-devel, libsecret-devel

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

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

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0.1-1
- new upstream release

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

* Sun Sep 04 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.1-1
- initial build for Vine Linux

