File libgweather.spec of Package libgweather
#
# spec file for package libgweather (Version 2.28.0)
#
# Copyright (c) 2009 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: libgweather
Version: 2.28.0
Release: 1
License: GPL v2 or later
Summary: Library to get online weather information
Group: Development/Libraries/GNOME
Source: %{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE libgweather-bnc428346-bundle.patch bnc428346 vuntz@novell.com -- Support a bundle directory so that bundle-lang-gnome-* doesn't conflict with libgweather-lang.
Patch1: libgweather-bnc428346-bundle.patch
BuildRequires: gconf2-devel
BuildRequires: gtk2-devel
BuildRequires: intltool
BuildRequires: libsoup-devel
BuildRequires: python-devel
BuildRequires: python-gobject2-devel
BuildRequires: python-gtk-devel
Requires: %{name}-lang = %{version}
Requires: libgweather1 = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
%if %suse_version <= 1110
%define python_sitearch %{py_sitedir}
%endif
%description
This is a library to download weather information from online sources.
%package devel
License: GPL v2 or later
Summary: Library to get online weather information
Group: Development/Libraries/GNOME
Requires: dbus-1-glib-devel
Requires: gconf2-devel
Requires: glib2-devel
Requires: gnome-vfs2-devel
Requires: gtk2-devel
Requires: libgweather1 = %{version}
Requires: libsoup-devel
# 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 libgweather1
License: GPL v2 or later
Summary: Library to get online weather information
Group: Development/Libraries/GNOME
Requires: %{name} >= %{version}
%description -n libgweather1
This is a library to download weather information from online sources.
%package -n python-gweather
License: GPL v2 or later
Summary: Library to get online weather information - Python bindings
Group: Development/Libraries/GNOME
%py_requires
%description -n python-gweather
This is a library to download weather information from online sources.
%lang_package
%prep
%setup -q
%patch1 -p1
%build
%configure \
--enable-locations-compression \
--disable-schemas-install \
--disable-static \
--enable-python
%{__make} %{?jobs:-j%jobs}
%install
%makeinstall
%find_lang libgweather
# Move localized Locations.xml files to the -lang package
for locationsxml in %{buildroot}%{_datadir}/libgweather/Locations.*.xml*; do
lang=`echo $locationsxml | %{__sed} "s/.*Locations\.\([^\.]*\)\.xml.*/\1/"`
ext=`echo $locationsxml | %{__sed} "s/.*Locations\..*\.xml\(.*\)/\1/"`
echo "%lang($lang) %{_datadir}/libgweather/Locations.$lang.xml$ext" >> %{name}.lang
done
%find_gconf_schemas
%{__cat} %{name}.schemas_list > %{name}.lst
%{__rm} -f %{buildroot}%{_libdir}/*.la
%clean
%{__rm} -rf %{buildroot}
%pre -f %{name}.schemas_pre
%post -n libgweather1 -p /sbin/ldconfig
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%postun -n libgweather1 -p /sbin/ldconfig
%files -f %{name}.lst
%defattr(-,root,root)
%doc AUTHORS README NEWS ChangeLog
%{_datadir}/libgweather
# Exclude files that we moved to the -lang package
%exclude %{_datadir}/libgweather/Locations.*.xml*
%files -n libgweather1
%defattr(-, root, root)
%{_libdir}/*.so.*
%files -n python-gweather
%defattr(-, root, root)
%{python_sitearch}/gweather/
%files devel
%defattr(-,root,root)
%{_includedir}/libgweather
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
# 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
%files lang -f %{name}.lang
%changelog