%undefine __cmake_in_source_build # uncomment to enable bootstrap mode #global bootstrap 1 %if !0%{?bootstrap} # avoid slow arm archs for now %ifnarch %{arm} %global tests 1 %endif %endif Name: kdecoration Summary: A plugin-based library to create window decorations Version: 5.25.2 Release: 1 License: LGPLv2 URL: https://cgit.kde.org/%{name}.git %global revision %(echo %{version} | cut -d. -f3) %if %{revision} >= 50 %global stable unstable %else %global stable stable %endif Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz BuildRequires: extra-cmake-modules BuildRequires: kf5-rpm-macros BuildRequires: qt5-qtbase-devel %if 0%{?tests} BuildRequires: dbus-x11 BuildRequires: xorg-x11-server-Xvfb %endif # For AutoReq cmake-filesystem BuildRequires: cmake BuildRequires: cmake(KF5I18n) BuildRequires: cmake(KF5CoreAddons) BuildRequires: make Requires: kf5-filesystem %description %{summary}. %package devel Summary: Developer files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary}. %prep %autosetup -p1 ## still needed? -- rex # Cleanup includes mess, install everything into %%{_kf5_includedir}/KDecoration2 sed -i "s/set(KDECORATION2_INCLUDEDIR \"\${CMAKE_INSTALL_INCLUDEDIR}\/KDecoration2\")/set(KDECORATION2_INCLUDEDIR \"\${KF5_INCLUDE_INSTALL_DIR}\/KDecoration2\")/" CMakeLists.txt %build mkdir %{_target_platform} pushd %{_target_platform} %{cmake_kf5} .. \ -DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF} popd %make_build -C %{_target_platform} %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} # create/own plugin dir mkdir -p %{buildroot}%{_kf5_qtplugindir}/org.kde.kdecoration2/ %check %if 0%{?tests} export CTEST_OUTPUT_ON_FAILURE=1 xvfb-run -a \ make test ARGS="--output-on-failure --timeout 20" -C %{_target_platform} ||: %endif %ldconfig_scriptlets %files %license LICENSES/*.txt %{_kf5_libdir}/libkdecorations2.so.* %{_kf5_libdir}/libkdecorations2private.so.* %{_datadir}/locale/*/LC_MESSAGES/kdecoration.mo %dir %{_kf5_qtplugindir}/org.kde.kdecoration2/ %files devel %{_kf5_libdir}/libkdecorations2.so %{_kf5_libdir}/libkdecorations2private.so %{_kf5_libdir}/cmake/KDecoration2/ %{_kf5_includedir}/kdecoration2_version.h %{_includedir}/KDecoration2 %changelog * Tue Jul 5 2022 peijiankang - 5.25.2-1 - update to upstream version 5.25.2 * Fri Feb 11 2022 peijiankang - 5.24.0-1 - update to upstream version 5.24.0 * Fri Jan 28 2022 peijiankang - 5.18.5-1 - revert to upstream version 5.18.5 * Tue Jan 18 2022 peijiankang - 5.23.3-1 - update to upstream version 5.23.3 * Fri Aug 7 2020 weidong - 5.15.4-1 - Initial release for OpenEuler