update URL, support bootstrap, add %check

This commit is contained in:
Rex Dieter 2016-05-09 08:25:52 -05:00
parent c85a068d8d
commit 4d3b5947d5

View File

@ -1,12 +1,19 @@
%global framework kdeclarative %global framework kdeclarative
# uncomment to enable bootstrap mode
#global bootstrap 1
%if !0%{?bootstrap}
%global tests 1
%endif
Name: kf5-%{framework} Name: kf5-%{framework}
Version: 5.21.0 Version: 5.21.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: KDE Frameworks 5 Tier 3 addon for Qt declarative Summary: KDE Frameworks 5 Tier 3 addon for Qt declarative
License: GPLv2+ and MIT 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 versiondir %(echo %{version} | cut -d. -f1-2)
%global revision %(echo %{version} | cut -d. -f3) %global revision %(echo %{version} | cut -d. -f3)
@ -33,6 +40,12 @@ BuildRequires: kf5-rpm-macros >= %{version}
BuildRequires: libepoxy-devel BuildRequires: libepoxy-devel
BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-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} Requires: kf5-filesystem >= %{version}
@ -57,7 +70,8 @@ developing applications that use %{name}.
%build %build
mkdir %{_target_platform} mkdir %{_target_platform}
pushd %{_target_platform} pushd %{_target_platform}
%{cmake_kf5} .. %{cmake_kf5} .. \
-DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF}
popd popd
make %{?_smp_mflags} -C %{_target_platform} 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 %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 %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
@ -99,6 +123,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog %changelog
* Mon May 09 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.21.0-2
- update URL, support bootstrap, add %%check
* Mon Apr 04 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.21.0-1 * Mon Apr 04 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.21.0-1
- KDE Frameworks 5.21.0 - KDE Frameworks 5.21.0