File libmateweather.spec of Package libmateweather

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


%define lname   libmateweather1
%define _version 1.10
Name:           libmateweather
Version:        1.10.0
Release:        0
Summary:        MATE Weather
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/GUI/Other
Url:            https://mate-desktop.org/
Source:         http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
Source1:        baselibs.conf
BuildRequires:  mate-common >= 1.9.0
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(pygobject-2.0)
BuildRequires:  pkgconfig(pygtk-2.0)
%glib2_gsettings_schema_requires

%description
libmateweather is a library to access weather information from
online services for numerous locations.

%package -n mateweather-common
Summary:        MATE Weather common files
Group:          System/GUI/Other
BuildArch:      noarch

%description -n mateweather-common
libmateweather is a library to access weather information from
online services for numerous locations.

%package devel
Summary:        MATE Weather development files
Group:          Development/Libraries/Other
Requires:       %{lname} = %{version}
Requires:       mateweather-common
Requires:       python-mateweather = %{version}

%description devel
libmateweather is a library to access weather information from
online services for numerous locations.

%package -n %{lname}
Summary:        MATE Weather shared libraries
Group:          System/Libraries
Requires:       mateweather-common
Recommends:     %{name}-lang
Provides:       %{name} = %{version}

%description -n %{lname}
libmateweather is a library to access weather information from
online services for numerous locations.

%package -n python-mateweather
Summary:        Python bindings for MATE Weater
Group:          System/GUI/Other

%description -n python-mateweather
libmateweather is a library to access weather information from
online services for numerous locations.

%lang_package

%prep
%setup -q

%build
%configure \
  --enable-locations-compression \
  --disable-static               \
  --enable-python
make %{?_smp_mflags}

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

if [ -d %{buildroot}%{_datadir}/MateConf ]; then
    rm -rf %{buildroot}%{_datadir}/MateConf
fi

%post -n mateweather-common
%glib2_gsettings_schema_post

%post -n %{lname} -p /sbin/ldconfig

%postun -n mateweather-common
%glib2_gsettings_schema_postun

%postun -n %{lname} -p /sbin/ldconfig

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

%files -n mateweather-common
%defattr(-,root,root)
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/icons/mate/
%{_datadir}/%{name}/

%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_includedir}/%{name}/
%{_libdir}/*.so
%{_libdir}/pkgconfig/mateweather.pc
%{_datadir}/gtk-doc/html/%{name}/

%files -n python-mateweather
%defattr(-,root,root)
%{python_sitearch}/mateweather/

%files lang -f %{name}.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by