File libgdata.spec of Package libgdata

#
# spec file for package libgdata
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


# Update baselibs.conf when changing this
%define _sover 22

Name:           libgdata
Version:        0.17.9
Release:        0
Summary:        GLib-based library for accessing online service APIs using the GData protocol
License:        LGPL-2.1+
Group:          Development/Libraries/GNOME
Url:            http://live.gnome.org/libgdata
Source:         https://download.gnome.org/sources/libgdata/0.17/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  translation-update-upstream
BuildRequires:  pkgconfig(gcr-base-3)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.14
BuildRequires:  pkgconfig(gio-2.0) >= 2.38.0
BuildRequires:  pkgconfig(goa-1.0) >= 3.8
BuildRequires:  pkgconfig(json-glib-1.0) >= 0.15
# Note: as of 0.10.0, gtk+-3.0 is only needed to build a demo that isn't
# installed, so no need to depend on it
#BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libsoup-2.4) >= 2.55.90
BuildRequires:  pkgconfig(libuhttpmock-0.0) >= 0.5.0
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(oauth)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libgdata is a GLib-based library for accessing online service APIs using
the GData protocol — most notably, Google's services. It provides APIs
to access the common Google services, and has full asynchronous support.

%package -n libgdata%{_sover}

Summary:        GLib-based library for accessing online service APIs using the GData protocol
Group:          System/Libraries
Recommends:     %{name}-lang
# Needed for the lang package to be installable:
Provides:       %{name} = %{version}

%description -n libgdata%{_sover}
libgdata is a GLib-based library for accessing online service APIs using
the GData protocol — most notably, Google's services. It provides APIs
to access the common Google services, and has full asynchronous support.

%package -n typelib-1_0-GData-0_0
Summary:        Introspection bindings for libgdata
Group:          System/Libraries

%description -n typelib-1_0-GData-0_0
libgdata is a GLib-based library for accessing online service APIs using
the GData protocol — most notably, Google's services. It provides APIs
to access the common Google services, and has full asynchronous support.

This package provides the GObject Introspection bindings for the
libgdata library.

%package devel
Summary:        Development files for libgdata, a library for accessing online service APIs
Group:          Development/Libraries/GNOME
Requires:       libgdata%{_sover} = %{version}
Requires:       typelib-1_0-GData-0_0 = %{version}

%description devel
libgdata is a GLib-based library for accessing online service APIs using
the GData protocol.

This subpackage contains the header files for developing
applications that want to make use of libgdata.


%lang_package
%prep
%setup -q
translation-update-upstream

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

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang gdata

%post -n libgdata%{_sover} -p /sbin/ldconfig

%postun -n libgdata%{_sover} -p /sbin/ldconfig

%files -n libgdata%{_sover}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING HACKING NEWS README
%{_libdir}/*.so.%{_sover}*

%files -n typelib-1_0-GData-0_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GData-0.0.typelib

%files devel
%defattr(-,root,root)
%{_includedir}/libgdata/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libgdata.pc
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/gdata/

%files lang -f gdata.lang

%changelog