diff --git a/kf5-kconfig.spec b/kf5-kconfig.spec index a2d5eb1..5fb970b 100644 --- a/kf5-kconfig.spec +++ b/kf5-kconfig.spec @@ -1,8 +1,17 @@ %global framework kconfig +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +# not quite ready -- rex +#global python 1 +%global tests 1 +%endif + Name: kf5-%{framework} Version: 5.38.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system License: GPLv2+ and LGPLv2+ and MIT @@ -24,9 +33,24 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{fra BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-rpm-macros >= %{version} + +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5Xml) BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel +%if 0%{?python} +BuildRequires: clang +BuildRequires: python2-qt5-devel +BuildRequires: python3-qt5-devel +%endif + +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif + Requires: kf5-filesystem >= %{version} Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-gui%{?_isa} = %{version}-%{release} @@ -38,9 +62,7 @@ parts: KConfigCore and KConfigGui. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: qt5-qtbase-devel -## included for completeness and documentation, but part of qtbase-devel already -- rex -#Requires: pkgconfig(Qt5Xml) +Requires: cmake(Qt5Xml) %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. @@ -68,7 +90,9 @@ their changes to their respective configuration files. %build mkdir %{_target_platform} pushd %{_target_platform} -%{cmake_kf5} .. +%{cmake_kf5} .. \ + %{?tests:-DBUILD_TESTING:BOOL=ON} \ + %{?python:-Dlibclang_LIBRARY:PATH=%{_libdir}/libclang.so} popd make %{?_smp_mflags} -C %{_target_platform} @@ -77,16 +101,27 @@ make %{?_smp_mflags} -C %{_target_platform} %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} -%find_lang kconfig5_qt --with-qt --all-name +%find_lang %{name} --all-name --with-qt + + +%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 %files %doc DESIGN README.md TODO %license COPYING.LIB + %post core -p /sbin/ldconfig %postun core -p /sbin/ldconfig -%files core -f kconfig5_qt.lang +%files core -f %{name}.lang %{_kf5_bindir}/kreadconfig5 %{_kf5_bindir}/kwriteconfig5 %{_kf5_libdir}/libKF5ConfigCore.so.* @@ -111,6 +146,10 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Wed Sep 13 2017 Rex Dieter - 5.38.0-2 +- cosmetics, support %%bootstrap, autotests +- initial support for python bindings (not ready yet) + * Mon Sep 11 2017 Rex Dieter - 5.38.0-1 - 5.38.0