From e6eff72b0747a42c6d2e88af9bf18843e1357f57 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 1 May 2016 07:06:18 -0500 Subject: [PATCH] 16.04.0, update URL, support bootstrap, add %check --- .gitignore | 4 +--- kf5-kcontacts.spec | 46 ++++++++++++++++++++++++++++++++++++---------- sources | 2 +- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 461d687..db581e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/kcontacts-15.12.1.tar.xz -/kcontacts-15.12.2.tar.xz -/kcontacts-15.12.3.tar.xz +/kcontacts-16.04.0.tar.xz diff --git a/kf5-kcontacts.spec b/kf5-kcontacts.spec index d0312e5..e0ec02f 100644 --- a/kf5-kcontacts.spec +++ b/kf5-kcontacts.spec @@ -1,12 +1,19 @@ %global framework kcontacts -Name: kf5-%{framework} -Version: 15.12.3 +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +%global tests 1 +%endif + +Name: kf5-%{framework} +Version: 16.04.0 Release: 1%{?dist} -Summary: The KContacts Library +Summary: The KContacts Library -License: LGPLv2+ -URL: https://projects.kde.org/%{framework} +License: LGPLv2+ +URL: https://projects.kde.org/%{framework} %global revision %(echo %{version} | cut -d. -f3) %if %{revision} >= 50 @@ -16,14 +23,19 @@ URL: https://projects.kde.org/%{framework} %endif Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{framework}-%{version}.tar.xz -BuildRequires: kf5-rpm-macros BuildRequires: extra-cmake-modules -BuildRequires: qt5-qtbase-devel - +BuildRequires: kf5-rpm-macros BuildRequires: kf5-kcoreaddons-devel >= 5.15 BuildRequires: kf5-ki18n-devel >= 5.15 BuildRequires: kf5-kconfig-devel >= 5.15 BuildRequires: kf5-kcodecs-devel >= 5.15 +BuildRequires: qt5-qtbase-devel +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb +%endif + %description %{summary}. @@ -38,13 +50,14 @@ developing applications that use %{name}. %prep -%setup -q -n %{framework}-%{version} +%autosetup -n %{framework}-%{version} -p1 %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} @@ -54,6 +67,16 @@ make %{?_smp_mflags} -C %{_target_platform} make install/fast DESTDIR=%{buildroot} -C %{_target_platform} +%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 30" -C %{_target_platform} ||: +%endif + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -71,6 +94,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Sun May 01 2016 Rex Dieter - 16.04.0-1 +- 16.04.0, update URL, support bootstrap, add %%check + * Tue Mar 15 2016 Rex Dieter - 15.12.3-1 - 15.12.3 diff --git a/sources b/sources index 0d2c8e4..dd81965 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -22bd36eb992baf8f88ed28a13ad0d1d7 kcontacts-15.12.3.tar.xz +35f3592c76f3ca705f0a9f2233d379d9 kcontacts-16.04.0.tar.xz