diff --git a/okular.spec b/okular.spec index 678838f..48bb3fe 100644 --- a/okular.spec +++ b/okular.spec @@ -6,10 +6,16 @@ %define mobi 1 %endif +# enable tests (they're disabled by default) +%global tests 1 +%if 0%{?tests} +%global _kde4_build_tests -DKDE4_BUILD_TESTS:BOOL=ON +%endif + Name: okular Summary: A document viewer Version: 4.12.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 URL: https://projects.kde.org/projects/kde/kdegraphics/okular @@ -55,9 +61,16 @@ BuildRequires: pkgconfig(libspectre) BuildRequires: pkgconfig(poppler-qt4) BuildRequires: pkgconfig(qca2) BuildRequires: pkgconfig(qimageblitz) +BuildRequires: pkgconfig(zlib) %if 0%{?active} BuildRequires: plasma-mobile-devel %endif +%if 0%{?tests} +BuildRequires: dbus-x11 +BuildRequires: kde-runtime +BuildRequires: oxygen-icon-theme +BuildRequires: xorg-x11-server-Xvfb +%endif # kio_msits migrates from kdegraphics, which had Epoch: 7 %define kio_msits_epoch 7 @@ -134,6 +147,9 @@ rm -fv %{buildroot}%{_kde4_datadir}/applications/kde4/active-documentviewer_*.de %check desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop +%if 0%{?tests} +time xvfb-run -a dbus-launch --exit-with-session make test ARGS="--output-on-failure --timeout 15" -C %{_target_platform}/ ||: +%endif %post @@ -197,6 +213,9 @@ fi %changelog +* Wed Jan 01 2014 Rex Dieter 4.12.0-3 +- KDE4_BUILD_TESTS:BOOL=ON + * Mon Dec 30 2013 Rex Dieter - 4.12.0-2 - rebuild against fixed qmobipocket - BR: libkexiv2-devel