File plasma-framework.spec of Package plasma-framework
#
# spec file for package plasma-framework
#
# Copyright (c) 2017 SUSE LINUX 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/
#
%bcond_without lang
%define _tar_path 5.37
Name: plasma-framework
Version: 5.37.0
Release: 0
%define kf5_version %{version}
Summary: Plasma library and runtime components based upon KF5 and Qt5
License: GPL-2.0+ and LGPL-2.0+
Group: System/GUI/KDE
Url: https://projects.kde.org/plasma-framework
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM
Patch0: 0001-ignore-spurious-resize-events-to-empty-sizes.patch
BuildRequires: extra-cmake-modules >= %{_tar_path}
BuildRequires: fdupes
BuildRequires: kactivities5-devel >= 5.19.0
BuildRequires: karchive-devel >= %{_tar_path}
BuildRequires: kconfig-devel >= %{_tar_path}
BuildRequires: kconfigwidgets-devel >= %{_tar_path}
BuildRequires: kcoreaddons-devel >= %{_tar_path}
BuildRequires: kdbusaddons-devel >= %{_tar_path}
BuildRequires: kdeclarative-devel >= %{_tar_path}
BuildRequires: kdoctools-devel >= %{_tar_path}
BuildRequires: kf5-filesystem
BuildRequires: kglobalaccel-devel >= %{_tar_path}
BuildRequires: kguiaddons-devel >= %{_tar_path}
BuildRequires: ki18n-devel >= %{_tar_path}
BuildRequires: kiconthemes-devel >= %{_tar_path}
BuildRequires: kio-devel >= %{_tar_path}
BuildRequires: knotifications-devel >= %{_tar_path}
BuildRequires: kpackage-devel >= %{_tar_path}
BuildRequires: kparts-devel >= %{_tar_path}
BuildRequires: kservice-devel >= %{_tar_path}
BuildRequires: kwayland-devel >= %{_tar_path}
BuildRequires: kwindowsystem-devel >= %{_tar_path}
BuildRequires: kxmlgui-devel >= %{_tar_path}
BuildRequires: libxcb-devel
BuildRequires: xz
BuildRequires: cmake(Qt5Gui) >= 5.6.0
BuildRequires: cmake(Qt5Qml) >= 5.6.0
BuildRequires: cmake(Qt5Quick) >= 5.6.0
BuildRequires: cmake(Qt5Sql) >= 5.6.0
BuildRequires: cmake(Qt5Svg) >= 5.6.0
BuildRequires: cmake(Qt5Test) >= 5.6.0
BuildRequires: cmake(Qt5Widgets) >= 5.6.0
BuildRequires: cmake(Qt5X11Extras) >= 5.6.0
BuildRequires: pkgconfig(egl)
%ifarch %arm aarch64
BuildRequires: pkgconfig(glesv2)
%else
BuildRequires: pkgconfig(gl)
%endif
BuildRequires: update-alternatives
BuildRequires: pkgconfig(x11)
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: libqt5-qtquickcontrols
%if %{with lang}
Recommends: %{name}-lang = %{version}
%endif
Recommends: %{name}-components = %{version}
Recommends: %{name}-private = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Plasma library and runtime components based upon KF5 and Qt5
%package private
Summary: Plasma private library and runtime components
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%description private
Plasma private library and runtime components based upon KF5 and Qt5
%package components
Summary: Plasma QML components
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Requires: %{name}-private = %{version}
%requires_ge kdeclarative-components
%description components
Plasma QML and runtime components based upon KF5 and Qt5
%package devel
Summary: Plasma library and runtime components
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Requires: %{name}-components = %{version}
Requires: %{name}-private = %{version}
Requires: extra-cmake-modules >= 1.7.0
Requires: kf5-filesystem
Requires: kpackage-devel >= %{_tar_path}
Requires: kservice-devel >= %{_tar_path}
Requires: kwindowsystem-devel >= %{_tar_path}
Requires: cmake(Qt5Gui) >= 5.6.0
Requires: cmake(Qt5Qml) >= 5.6.0
Requires: cmake(Qt5Quick) >= 5.6.0
Conflicts: kapptemplate <= 15.12.3
%description devel
Plasma library and runtime components based upon KF5 and Qt5
%lang_package
%prep
%setup -q
%patch0 -p1
%build
%cmake_kf5 -d build
%make_jobs
%install
%kf5_makeinstall -C build
%fdupes %{buildroot}
%if %{with lang}
%find_lang %{name} --with-man --all-name
%endif
# update-alternatives for input.svgz
mv %{buildroot}%{_datadir}/plasma/desktoptheme/default/icons/input.svgz \
%{buildroot}%{_datadir}/plasma/desktoptheme/default/icons/input.svgz-kdeorg
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/input.svgz
ln -sf %{_sysconfdir}/alternatives/input.svgz \
%{buildroot}%{_datadir}/plasma/desktoptheme/default/icons/input.svgz
%post
/sbin/ldconfig
update-alternatives --install \
%{_datadir}/plasma/desktoptheme/default/icons/input.svgz \
input.svgz \
%{_datadir}/plasma/desktoptheme/default/icons/input.svgz-kdeorg \
60
%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
update-alternatives --remove input.svgz \
%{_datadir}/plasma/desktoptheme/default/icons/input.svgz-kdeorg
fi
%post private -p /sbin/ldconfig
%postun private -p /sbin/ldconfig
%if %{with lang}
%files lang -f %{name}.lang
# LC_SCRIPTS is not recognized by find-lang.sh
%lang(lt) %{_datadir}/locale/lt/LC_SCRIPTS
%endif
%files
%defattr(-,root,root)
%doc COPYING*
%ghost %{_sysconfdir}/alternatives/input.svgz
%{_kf5_bindir}/*
%{_kf5_libdir}/libKF5Plasma.so.*
%{_kf5_plugindir}/
%{_kf5_plasmadir}/
%{_kf5_servicesdir}/
%{_kf5_servicetypesdir}/
%{_kf5_mandir}/man1/plasmapkg*.*
%exclude %{_kf5_servicesdir}/plasma-scriptengine-applet-declarative.desktop
%exclude %{_kf5_plugindir}/plasma/scriptengines/plasma_appletscript_declarative.so
%exclude %{_kf5_servicetypesdir}/plasma-wallpaper.desktop
%files private
%defattr(-,root,root)
%doc COPYING*
%{_kf5_libdir}/libKF5PlasmaQuick.so.*
%dir %{_kf5_qmldir}/org/kde/plasma/components
%dir %{_kf5_qmldir}/org/kde/plasma/core
%dir %{_kf5_qmldir}/org/kde/plasma
%dir %{_kf5_qmldir}/org/kde
%dir %{_kf5_qmldir}/org
%{_kf5_qmldir}/org/kde/plasma/components/private/
%{_kf5_qmldir}/org/kde/plasma/core/private/
%{_kf5_servicesdir}/plasma-scriptengine-applet-declarative.desktop
%dir %{_kf5_plugindir}/plasma/scriptengines
%{_kf5_plugindir}/plasma/scriptengines/plasma_appletscript_declarative.so
%{_kf5_servicetypesdir}/plasma-wallpaper.desktop
%files components
%defattr(-,root,root)
%doc COPYING*
%{_kf5_qmldir}/
%exclude %{_kf5_qmldir}/org/kde/plasma/components/private/
%exclude %{_kf5_qmldir}/org/kde/plasma/core/private/
%files devel
%defattr(-,root,root)
%doc COPYING*
%dir %{_kf5_includedir}/*/
%{_kf5_includedir}/*/
%{_kf5_includedir}/*.h
%{_kf5_libdir}/cmake/*/
%{_kf5_libdir}/*.so
%{_kf5_sharedir}/kdevappwizard
%changelog