%define         package_version 3.16.3
%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.16/%{name}-%{version}.tar.xz

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

BuildRequires:	glib2-devel
BuildRequires:	gobject-introspection-devel
BuildRequires:	gtk3-devel
BuildRequires:	webkitgtk4-devel >= 2.7.2
BuildRequires:	telepathy-glib-devel > 0.19.9
BuildRequires:	json-glib-devel
BuildRequires:	gcr-devel
BuildRequires:	libsecret-devel
BuildRequires:	libnotify-devel
BuildRequires:	libaccounts-glib-devel
BuildRequires:	rest-devel
BuildRequires:	krb5-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        docs
Summary:        Documentation for gnome-online-accounts
Summary(ja):    gnome-online-accounts 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch
Provides:       %{name}-doc = %{version}-%{release}


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


%prep
%setup -q

%build
%configure \
	--disable-static \
	--enable-gtk-doc \
	--enable-flickr=yes \
	--enable-foursquare=yes \
	--enable-media-server=yes \
	--enable-kerberos=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"

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}
%find_lang %{name}-tpaw

%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 -f %{name}-tpaw.lang
%defattr(-,root,root,-)
%doc ChangeLog AUTHORS COPYING NEWS README
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%{_libdir}/goa-1.0/web-extensions/libgoawebextension.so
%{_libexecdir}/goa-daemon
%{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service
%{_datadir}/glib-2.0/schemas/org.gnome.online-accounts.gschema.xml
%{_datadir}/%{name}/irc-networks.xml
%{_datadir}/icons/hicolor/*/*/*
%{_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 docs
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/goa


%changelog
* Wed Jun 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.3-1
- new upstream release

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release
- change BuildRequires: webkitgtk4-devel instead of WebKit3-gtk-devel
- add BuildRequires: libaccounts-glib-devel, krb5-devel

* Wed Jan 28 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.3-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.2-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release

* Fri Jul 18 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.4-1
- new upstream release

* Wed Jun 11 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.3-1
- new upstream release

* Fri May 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

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

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release
- add BuildRequires: telepathy-glib-devel

* Fri Sep 06 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.3-1
- new upstream release

* Sat May 18 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* 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

