File plasmoid-yawp.spec of Package plasmoid-yawp4
#
# spec file for package plasmoid-yawp
#
# Copyright (c) 2008-2009 Buschmann <buschmann23@opensuse.org>
# Copyright (c) 2024 SUSE LLC
#
# 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 999199
Summary: Yet Another Weather Plasmoid
Group: System/GUI/KDE
Source0: %{tarname}-%{version}.tar.bz2
Source1: %{tarname}_themes_pack-%{themeversion}.tar.bz2
Patch0: %{tarname}-accuweather.patch
URL: https://store.kde.org/p/%{kdeLookID}
BuildRequires: kdebase4-workspace-devel
BuildRequires: plasma-addons-devel
BuildRequires: libqjson-devel
Requires: kdebase4-workspace
Requires: %{name}-themes-default = %{version}
Suggests: %{name}-themes = %{version}
%description
Yet Another Weather Plasmoid.
Features multicity display from open-meteo.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
%autosetup -p1 -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
%files -f plasma_applet_yawp.lang
%defattr(0644,root,root,0755)
%doc README TODO CHANGELOG COPYRIGHT LICENSE-BSD LICENSE-GPL2 LICENSE-LGPL-2
%{_kde4_modulesdir}/ion_{accuweather,open-meteo}.so
%{_kde4_modulesdir}/plasma_applet_yawp.so
%{_kde4_servicesdir}/*.desktop
%files themes-default
%defattr(0644,root,root,0755)
%{_kde4_appsdir}/desktoptheme/default/widgets/yawp_theme15.svg
%files themes
%defattr(0644,root,root,0755)
%{_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