File libgweather.spec of Package libgweather

#
# spec file for package libgweather
#
# Copyright (c) 2016 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/
#


Name:           libgweather
Version:        3.20.3
Release:        0
Summary:        Library to get online weather information
License:        GPL-2.0+
Group:          Development/Libraries/GNOME
Url:            http://developer.gnome.org/libgweather/
Source:         http://download.gnome.org/sources/libgweather/3.20/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  libxml2-tools
BuildRequires:  libxslt
BuildRequires:  pkgconfig(geocode-glib-1.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.13.5
BuildRequires:  pkgconfig(libsoup-2.4) >= 2.44.0
BuildRequires:  pkgconfig(vapigen)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a library to download weather information from online sources.

%package data
Summary:        Library to get online weather information
Group:          Development/Libraries/GNOME
Requires:       libgweather-3-6 = %{version}
Recommends:     %{name}-lang
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}
BuildArch:      noarch
%glib2_gsettings_schema_requires

%description data
This is a library to download weather information from online sources.
This package provides the architecture independent files.

%package devel
Summary:        Library to get online weather information
Group:          Development/Libraries/GNOME
Requires:       libgweather-3-6 = %{version}
Requires:       typelib-1_0-GWeather-3_0 = %{version}
# prior to version 2.21.x, gnome-applets-devel only included files
# now included in libgweather-devel, so we provide/obsolete
# gnome-applets-devel here.
Provides:       gnome-applets-devel = 2.21.4
Obsoletes:      gnome-applets-devel < 2.21.4
# gnome-applets-devel also provided and obsoleted gswitchit-devel, so
# we need to do that here as well
Provides:       gswitchit-devel
Obsoletes:      gswitchit-devel

%description devel
This is a library to download weather information from online sources.

%package -n libgweather-3-6
Summary:        Library to get online weather information
Group:          Development/Libraries/GNOME
Requires:       %{name}-data >= %{version}

%description -n libgweather-3-6
This is a library to download weather information from online sources.

%package -n typelib-1_0-GWeather-3_0
Summary:        Library to get online weather information -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-GWeather-3_0
This is a library to download weather information from online sources.

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

%lang_package
%prep
%setup -q

%build
%configure \
        --disable-static \
        --enable-introspection
%{__make} %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_lang libgweather-3.0 %{?no_lang_C}
%find_lang libgweather-locations libgweather-3.0.lang %{?no_lang_C}

%post -n libgweather-3-6 -p /sbin/ldconfig

%postun -n libgweather-3-6 -p /sbin/ldconfig

%post data
%glib2_gsettings_schema_post
%icon_theme_cache_post gnome

%postun data
%glib2_gsettings_schema_postun
%icon_theme_cache_postun gnome

%files data
%defattr(-,root,root)
%doc AUTHORS README NEWS
%{_datadir}/glib-2.0/schemas/org.gnome.GWeather.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.GWeather.gschema.xml
%{_datadir}/libgweather/

%files -n libgweather-3-6
%defattr(-, root, root)
%{_libdir}/*.so.*

%files -n typelib-1_0-GWeather-3_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GWeather-3.0.typelib

%files devel
%defattr(-,root,root)
%{_includedir}/libgweather-3.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/gweather-3.0.pc
%{_datadir}/gir-1.0/GWeather-3.0.gir
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/gweather-3.0.vapi
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/libgweather-3.0

%files lang -f %{name}-3.0.lang

%changelog
openSUSE Build Service is sponsored by