File plasmoid-yawp.spec of Package plasmoid-yawp4

#
# spec file for package plasmoid-yawp
#
# Copyright (c) 2008-2009 Buschmann <buschmann23@opensuse.org>
# Copyright (c) 2013 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/
#

%define tarname      yawp
Name:                plasmoid-%{tarname}
Version:             0.4.5
%define themeversion 0.2
Release:             0
License:             GPL-2.0+
%define kdeLookID    94106
Summary:             Yet Another Weather Plasmoid
Group:               System/GUI/KDE
Source0:             %{tarname}-%{version}.tar.bz2
Source1:             %{tarname}_themes_pack-%{themeversion}.tar.bz2
Url:                 http://www.kde-look.org/content/show.php?content=%{kdeLookID}
BuildRequires:       kdebase4-workspace-devel
BuildRequires:       plasma-addons-devel
Requires:            kdebase4-workspace
# a theme is required, it will cause Plasma to crash otherwise
Requires:            %{name}-themes-default = %{version}
Suggests:            %{name}-themes = %{version}
BuildRoot:           %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires

%description
Yet Another Weather Plasmoid.
Features multicity display and satelite map from
accuweather.com

%package debugutils
Summary:             Utilities for debugging %{name}
Group:               Development/Tools/Debuggers
Requires:            %{name} = %{version}
%kde4_runtime_requires

%description debugutils
Utilities for debugging the workings of %{name}.

%package themes-default
Summary:             Default Theme for %{name}
Group:               System/GUI/KDE
Requires:            %{name} = %{version}
BuildArch:           noarch

%description themes-default
The default theming file for %{name}

%package themes
Summary:             Additional Themes for %{name}
Group:               System/GUI/KDE
Requires:            %{name} = %{version}
BuildArch:           noarch

%description themes
Additional theming files for %{name}

%prep
%setup -D -q -n %{tarname}-%{version} -a 1

%build
  %cmake_kde4 -d builddir -- -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -DBUILD_UNITTESTS=YES
  %make_jobs

%install
mkdir -p %{buildroot}%{_kde4_appsdir}/desktoptheme/default/widgets/
cp -v yawp_themes_pack-%{themeversion}/* %{buildroot}%{_kde4_appsdir}/desktoptheme/default/widgets/
  pushd builddir
  %kde4_makeinstall
  popd

mkdir -p %{buildroot}%{_bindir}
pushd builddir/unittest
cp -v configtest \
 iontest \
 plasmoidtest \
 streamloggertest \
 weatherenginetest \
 weatherservicetest \
 %{buildroot}%{_kde4_bindir}
popd

  %kde_post_install
  %find_lang plasma_applet_yawp
cat plasma_applet_yawp.lang

%clean
  rm -rf %{buildroot}

%files -f plasma_applet_yawp.lang
%defattr(644,root,root,755)
%doc README TODO CHANGELOG COPYRIGHT LICENSE-BSD LICENSE-GPL2 LICENSE-LGPL-2
%{_kde4_modulesdir}/ion_accuweather.so
%{_kde4_modulesdir}/ion_wunderground.so
%{_kde4_modulesdir}/plasma_applet_yawp.so
%{_kde4_servicesdir}/*.desktop

%files themes-default
%defattr(644,root,root,755)
%{_kde4_appsdir}/desktoptheme/default/widgets/yawp_theme15.svg

%files themes
%defattr(644,root,root,755)
%{_kde4_appsdir}/desktoptheme/default/widgets/7even01.svgz
%{_kde4_appsdir}/desktoptheme/default/widgets/Oxygen.svgz
%{_kde4_appsdir}/desktoptheme/default/widgets/like-Weather-com.svgz

%files debugutils
%defattr(-,root,root)
%{_kde4_bindir}/*

%changelog
openSUSE Build Service is sponsored by