File plasmoid-cwp.spec of Package plasmoid-cwp

#
# spec file for package plasmoid-cwp (Version 1.3.3)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 Buschmann <buschmann23@opensuse.org>
#
# 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/
#

# norootforbuild

BuildRequires:  libkde4-devel
BuildRequires:  licenses
BuildRequires:  update-desktop-files

Name:           plasmoid-cwp
Version:        1.3.3
Release:        1
License:        GPLv3
Summary:        Customizable Weather Plasmoid
Url:            http://www.kde-look.org/content/show.php?content=98925
Group:          System/GUI/KDE
Source0:        http://kde-look.org/CONTENT/content-files/98925-cwp-%{version}.tar.bz2
# Clarify where the xml files mentioned in the README are installed 
Patch1:         readme.patch

# renamed when plasmoid was renamed with version 0.9.3
Provides:       plasmoid-customizable-weather = %{version}
Obsoletes:      plasmoid-customizable-weather < %{version}
AutoReqProv:    yes

Requires:       kdebase4-workspace
Requires:       licenses
%kde4_runtime_requires
Suggests:       %{name}-lang = %{version}

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is another weather plasmoid.
It aims to be highly customizable, but a little harder to setup
than other weather plasmoids.
But you'll have up to 7 days forecast afterwards.

Nearly any weather forecast provider can be used, as long as the
data is provided as html files (no flash).
The information how to extract the information from these
html files is stored inside xml files.
Commands like grep, head, tail, sed, awk, ... will do this job.

Some xml files are already included, you can find them under
/usr/share/kde4/apps/plasma-cwp

Author:
--------
    Georg Hennig


%lang_package
%prep
%setup -n cwp-%{version}
%patch1

%build
  %cmake_kde4 -d builddir
  %make_jobs

%install
  cd builddir
  %kde4_makeinstall
  cd ..
  MD5SUM=$(md5sum COPYING | sed 's/ .*//')
  if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
      ln -sf /usr/share/doc/licenses/md5/$MD5SUM COPYING
  fi
  %suse_update_desktop_file -n %{buildroot}%{_datadir}/kde4/services/plasma-applet-cwp.desktop
  %kde_post_install
  %find_lang plasma_applet_cwp

%clean
  rm -rf %{buildroot}

%files
%defattr(644,root,root,755)
%doc ChangeLog COPYING README
%_kde4_modules/plasma_applet_cwp.so
%_kde_share_dir/services/plasma-applet-cwp.desktop
%dir %_kde_share_dir/apps/desktoptheme
%dir %_kde_share_dir/apps/desktoptheme/default
%dir %_kde_share_dir/apps/desktoptheme/default/widgets
%_kde_share_dir/apps/desktoptheme/default/widgets/*.svgz
%_kde_share_dir/apps/plasma-cwp
%{_datadir}/icons/oxygen/scalable/status/weather-windy.svgz
%{_datadir}/icons/oxygen/128x128/status/weather-windy.png

%files lang -f plasma_applet_cwp.lang

%changelog