diff --git a/extra-cmake-modules.spec b/extra-cmake-modules.spec index 46807e9..232b32a 100644 --- a/extra-cmake-modules.spec +++ b/extra-cmake-modules.spec @@ -1,7 +1,16 @@ + +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +%global docs 1 +%global tests 1 +%endif + Name: extra-cmake-modules Summary: Additional modules for CMake build system Version: 5.23.0 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD URL: https://quickgit.kde.org/?p=extra-cmake-modules.git @@ -18,6 +27,13 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{nam BuildArch: noarch BuildRequires: kf5-rpm-macros +%if 0%{?docs} +# qcollectiongenerator +BuildRequires: qt5-qttools-devel +# sphinx-build +BuildRequires: python2-sphinx +%endif + Requires: kf5-rpm-macros %description @@ -31,7 +47,8 @@ Additional modules for CMake build system needed by KDE Frameworks. %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} @@ -41,13 +58,27 @@ make %{?_smp_mflags} -C %{_target_platform} make install/fast DESTDIR=%{buildroot} -C %{_target_platform} +%check +%if 0%{?tests} +export CTEST_OUTPUT_ON_FAILURE=1 +make test ARGS="--output-on-failure --timeout 300" -C %{_target_platform} +%endif + + %files %doc README.rst %license COPYING-CMAKE-SCRIPTS %{_datadir}/ECM/ +%if 0%{?docs} +%{_kf5_docdir}/ECM/html/ +%{_kf5_mandir}/man7/ecm*.7* +%endif %changelog +* Tue Jun 07 2016 Rex Dieter - 5.23.0-2 +- support bootstrap, add docs/tests + * Tue Jun 07 2016 Rex Dieter - 5.23.0-1 - 5.23.0, relax kf5-rpm-macros dep