File libmateweather.spec of Package libmateweather

#
# spec file for libmateweather
#
# Copyright (c) 2014 SUSE LINUX Products 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:           libmateweather
%define _name   libmateweather1
Version:        1.8.0
Release:        0
License:        GPL-2.0+ and LGPL-2.1+
Summary:        MATE Weather
Url:            https://mate-desktop.org/
Group:          System/GUI/Other
Source0:        http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
%glib2_gsettings_schema_requires

BuildRequires:  mate-common
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gtk-doc)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(pygobject-2.0)
BuildRequires:  pkgconfig(pygtk-2.0)

%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:       mateweather-common
Requires:       %{_name} = %{version}
Requires:       python-mateweather = %{version}

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

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

%description -n %{_name}
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} V=1

%install
%makeinstall
%find_lang %{name} %{?no_lang_C}
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
if [ -d %{buildroot}%{_datadir}/MateConf ]; then
   rm -r %{buildroot}%{_datadir}/MateConf
fi

%post -n mateweather-common
%glib2_gsettings_schema_post

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

%postun -n mateweather-common
%glib2_gsettings_schema_postun

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

%files -n %{_name}
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_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 ChangeLog
%{_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