diff --git a/kdecoration.spec b/kdecoration.spec index 5f95ff8..bc55359 100644 --- a/kdecoration.spec +++ b/kdecoration.spec @@ -1,7 +1,15 @@ + +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +%global tests 1 +%endif + Name: kdecoration Summary: A plugin-based library to create window decorations Version: 5.10.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 URL: https://cgit.kde.org/%{name}.git @@ -18,6 +26,11 @@ BuildRequires: extra-cmake-modules BuildRequires: kf5-rpm-macros BuildRequires: qt5-qtbase-devel +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: xorg-x11-server-Xvfb +%endif + Requires: kf5-filesystem %description @@ -33,15 +46,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %prep %autosetup -p1 - -%build ## 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} .. +%{cmake_kf5} .. \ + -DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF} popd make %{?_smp_mflags} -C %{_target_platform} @@ -53,6 +67,13 @@ 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 + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -72,6 +93,9 @@ mkdir -p %{buildroot}%{_kf5_qtplugindir}/org.kde.kdecoration2/ %changelog +* Sun Jul 02 2017 Rex Dieter - 5.10.3-2 +- add %%check, support %%bootstrap + * Tue Jun 27 2017 Rex Dieter - 5.10.3-1 - 5.10.3