diff --git a/kf5-kcmutils.spec b/kf5-kcmutils.spec index 00bc80c..91b8c69 100644 --- a/kf5-kcmutils.spec +++ b/kf5-kcmutils.spec @@ -1,12 +1,20 @@ %global framework kcmutils +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +## currently includes no tests, consider re-enabling when it does +#global tests 1 +%endif + Name: kf5-%{framework} Version: 5.21.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 3 addon with extra API to write KConfigModules License: LGPLv2+ -URL: http://projects.kde.org/kcmutils +URL: https://quickgit.kde.org/?p=%{framework}.git %global versiondir %(echo %{version} | cut -d. -f1-2) %global revision %(echo %{version} | cut -d. -f3) @@ -30,6 +38,11 @@ BuildRequires: kf5-kxmlgui-devel >= %{version} BuildRequires: kf5-rpm-macros >= %{version} BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtdeclarative-devel +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif Requires: kf5-filesystem >= %{version} @@ -54,7 +67,8 @@ developing applications that use %{name}. %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} @@ -65,6 +79,19 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %find_lang kcmutils5_qt --with-qt --all-name +# create/own dirs +mkdir -p %{buildroot}%{_kf5_qtplugindir}/kcms + + +%check +%if 0%{?tests} +export CTEST_OUTPUT_ON_FAILURE=1 +xvfb-run -a \ +dbus-launch --exit-with-session \ +time \ +make test ARGS="--output-on-failure --timeout 300" -C %{_target_platform} ||: +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -74,6 +101,7 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %license COPYING.LIB %{_kf5_libdir}/libKF5KCMUtils.so.* %{_kf5_datadir}/kservicetypes5/*.desktop +%{_kf5_qtplugindir}/kcms/ %files devel %{_kf5_includedir}/kcmutils_version.h @@ -84,6 +112,12 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Sat Apr 30 2016 Rex Dieter - 5.21.0-2 +- update URL +- support bootstrap +- add %%check +- own %{_kf5_qtplugindir}/kcms/ + * Mon Apr 04 2016 Rex Dieter - 5.21.0-1 - KDE Frameworks 5.21.0