%define tp_glib_ver	0.18.0

Name:           folks
Version:        0.8.0
Release:        1%{?_dist_release}
Summary:        GObject contact aggregation library

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://telepathy.freedesktop.org/wiki/Folks
Source0:        http://download.gnome.org/sources/folks/0.8/%{name}-%{version}.tar.xz

BuildRequires:  telepathy-glib-devel >= %{tp_glib_ver}
BuildRequires:  telepathy-glib-vala >= %{tp_glib_ver}
BuildRequires:  evolution-data-server-devel >= 3.0.1
BuildRequires:  glib2-devel
BuildRequires:  libgee06-devel
BuildRequires:  libxml2-devel
BuildRequires:  libsocialweb-devel
BuildRequires:  libzeitgeist-devel
#BuildRequires:  vala-devel
#BuildRequires:  vala-tools

Requires(postun,posttrans):	glib2

Vendor: Project Vine
Distribution: Vine Linux

%description
libfolks is a library that aggregates people from multiple sources (e.g. 
Telepathy connection managers and eventually evolution data server, 
Facebook, etc.) to create meta-contacts. 


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:	telepathy-glib-devel >= %{tp_glib_ver}
Requires:	libgee06-devel
Requires:	glib2-devel
Requires:	pkgconfig

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


%prep
%setup -q

%build
%configure \
	--disable-static 
make %{?_smp_mflags}


%install
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%find_lang %{name}

%post -p /sbin/ldconfig

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

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


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/%{name}-import
%{_libdir}/*.so.*
%{_libdir}/folks
%{_libdir}/girepository-1.0/*.typelib
%{_datadir}/GConf/gsettings/folks.convert
%{_datadir}/glib-2.0/schemas/org.freedesktop.folks.gschema.xml
%{_datadir}/vala/vapi/%{name}*

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


%changelog
* Fri Oct 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.0-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.4.1-1
- new upstream release
- change BuildRequires: libgee06-devel instead of libgee-devel
- add BuildRequires: libzeitgeist-devel

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

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

* Sun Nov 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.5-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.4.1-1
- new upstream release

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

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

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.1-1
- new upstream release
- add BuildRequires: libsocialweb-devel

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

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.2-1
- new upstream release
- add BuildRequires: GConf2-devel

* Sun Oct 10 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.0-1
- initial build for Vine Linux


* Wed Sep 29 2010 jkeating - 0.2.0-2
- Rebuilt for gcc bug 634757

* Sat Sep 25 2010 Brian Pepple <bpepple@fedoraproject.org> - 0.2.0-1
- Update to 0.2.0.
- Add missing requires to devel subpackage.
- Drop DSO linkng patch. Fixed upstream.

* Sun Sep 12 2010 Brian Pepple <bpepple@fedoraproject.org> - 0.1.17-1
- Update to 0.1.17.
- Add patch to fix DSO linking for import tool.
- Add BR on libxml2-devel so import tool is built.

* Wed Sep  1 2010 Yanko Kaneti <yaneti@declera.com> 0.1.16-1
- New upstream release.

* Thu Aug 30 2010 Yanko Kaneti <yaneti@declera.com> 0.1.15-1
- New upstream release. Drop the RPATH hacks.

* Thu Aug 19 2010 Yanko Kaneti <yaneti@declera.com> 0.1.14.1-1
- New upstream release. Requires vala >= 0.9.6

* Thu Aug 19 2010 Yanko Kaneti <yaneti@declera.com> 0.1.14-2
- Use chrpath to remove the lingering RPATH because the guidelines
  recomended sed makes libtool incapable of building the tp-lowlevel.gir.
  Better solution welcome.

* Wed Aug 18 2010 Yanko Kaneti <yaneti@declera.com> 0.1.14-1
- New upstream. Remove patch and libtool hack.

* Tue Aug 17 2010 Yanko Kaneti <yaneti@declera.com> 0.1.13-4
- Add BR: vala-tools

* Tue Aug 17 2010 Yanko Kaneti <yaneti@declera.com> 0.1.13-3
- Update for the available telepathy-glib vala packaging

* Thu Aug 12 2010 Yanko Kaneti <yaneti@declera.com> 0.1.13-2
- Add BR: libgee-devel

* Thu Aug 12 2010 Yanko Kaneti <yaneti@declera.com> 0.1.13-1
- New upstream release
- Autofoo for the new vala api versioning

* Tue Aug  3 2010 Yanko Kaneti <yaneti@declera.com> 0.1.12-1
- New upstream release

* Mon Aug  2 2010 Yanko Kaneti <yaneti@declera.com> 0.1.11-1
- Packaged for review
