diff --git a/kf5-kdeclarative.spec b/kf5-kdeclarative.spec index d17cc85..251641e 100644 --- a/kf5-kdeclarative.spec +++ b/kf5-kdeclarative.spec @@ -1,12 +1,19 @@ %global framework kdeclarative +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +%global tests 1 +%endif + Name: kf5-%{framework} Version: 5.21.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 3 addon for Qt declarative License: GPLv2+ and MIT -URL: https://projects.kde.org/kdeclarative/ +URL: https://quickgit.kde.org/?p=%{framework}.git %global versiondir %(echo %{version} | cut -d. -f1-2) %global revision %(echo %{version} | cut -d. -f3) @@ -33,6 +40,12 @@ BuildRequires: kf5-rpm-macros >= %{version} BuildRequires: libepoxy-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtdeclarative-devel +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: mesa-dri-drivers +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif Requires: kf5-filesystem >= %{version} @@ -57,7 +70,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} @@ -69,6 +83,16 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %find_lang kdeclarative5_qt --with-qt --all-name +%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 10 --verbose" -C %{_target_platform} ||: +%endif + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -99,6 +123,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Mon May 09 2016 Rex Dieter - 5.21.0-2 +- update URL, support bootstrap, add %%check + * Mon Apr 04 2016 Rex Dieter - 5.21.0-1 - KDE Frameworks 5.21.0