File libgweather.spec of Package libgweather

#
# spec file for package libgweather
#
# 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/
#


Name:           libgweather
Version:        3.26.1
Release:        0
Summary:        Library to get online weather information
License:        GPL-2.0+
Group:          Development/Libraries/GNOME
Url:            http://developer.gnome.org/libgweather/

Source0:        http://download.gnome.org/sources/libgweather/3.26/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM libgweather-locations-Kowloon-is-a-district.patch bgo#791095 zaitor@opensuse.org -- Kowloon is a district in the city of Hong Kong. Not a town
Patch0:         libgweather-locations-Kowloon-is-a-district.patch

BuildRequires:  gobject-introspection-devel
BuildRequires:  gtk-doc
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)

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

%package -n gweather-data
Summary:        Auxiliary schema data for libgweather
Group:          Development/Libraries/GNOME
Requires:       libgweather-3-6 = %{version}
Recommends:     %{name}-lang
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}
Provides:       libgweather-data = %{version}
Obsoletes:      libgweather-data < %{version}
BuildArch:      noarch
%glib2_gsettings_schema_requires

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

%package devel
Summary:        Development files for libgweather, a weather info retrieval library
Group:          Development/Libraries/GNOME
Requires:       libgweather-3-6 = %{version}
Requires:       typelib-1_0-GWeather-3_0 = %{version}

%description devel
This is a library to download weather information from online sources.
This package provides the development files.

%package -n libgweather-3-6
Summary:        Library to get online weather information
Group:          Development/Libraries/GNOME
Requires:       gweather-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:        Introspection bindings for libgweather
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
%autosetup -p1

%build
%configure \
	--disable-static \
	--enable-introspection \
	--enable-gtk-doc \
	%{nil}
%make_build

%install
%make_install
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

%files -n gweather-data
%license COPYING
%{_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
%{_libdir}/*.so.*

%files -n typelib-1_0-GWeather-3_0
%{_libdir}/girepository-1.0/GWeather-3.0.typelib

%files devel
%doc AUTHORS README NEWS
%{_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
%{_datadir}/gtk-doc/html/libgweather-3.0

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

%changelog
openSUSE Build Service is sponsored by