From 619cf4e14421e77639391210af8f5c63146c392c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 5 Jun 2020 14:34:31 -0500 Subject: [PATCH] allow use of perl(URI::Escape) on pure rhel, enable tests --- kf5-kdoctools.spec | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/kf5-kdoctools.spec b/kf5-kdoctools.spec index 853389f..e61ed79 100755 --- a/kf5-kdoctools.spec +++ b/kf5-kdoctools.spec @@ -1,8 +1,15 @@ %global framework kdoctools +# uncomment to enable bootstrap mode +#global bootstrap 1 + +%if !0%{?bootstrap} +%global tests 1 +%endif + Name: kf5-%{framework} Version: 5.70.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 2 addon for generating documentation License: GPLv2+ and MIT @@ -30,10 +37,13 @@ BuildRequires: libxslt-devel %if 0%{?fedora} || 0%{?rhel} > 7 %global _with_html --with-html BuildRequires: perl-generators -BuildRequires: perl(Any::URI::Escape) +%endif +%if 0%{?fedora} || 0%{?epel} > 7 +%global perl_uri_escape perl(Any::URI::Escape) %else -BuildRequires: perl(URI::Escape) +%global perl_uri_escape perl(URI::Escape) %endif +BuildRequires: %{perl_uri_escape} BuildRequires: qt5-qtbase-devel Requires: docbook-dtds @@ -47,11 +57,7 @@ Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Provides: kf5-kdoctools-static = %{version}-%{release} Requires: qt5-qtbase-devel -%if 0%{?fedora} || 0%{?rhel} > 7 -Requires: perl(Any::URI::Escape) -%else -Requires: perl(URI::Escape) -%endif +Requires: %{perl_uri_escape} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. @@ -64,7 +70,8 @@ developing applications that use %{name}. %build mkdir %{_target_platform} pushd %{_target_platform} -%{cmake_kf5} .. +%{cmake_kf5} .. \ + %{?tests:-DBUILD_TESTING:BOOL=ON} popd %make_build -C %{_target_platform} @@ -76,6 +83,13 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %find_lang %{name} --all-name --with-man %{?_with_html} +%check +%if 0%{?tests} +export CTEST_OUTPUT_ON_FAILURE=1 +make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: +%endif + + %ldconfig_scriptlets %files -f %{name}.lang @@ -99,6 +113,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Fri Jun 05 2020 Rex Dieter - 5.70.0-2 +- allow use of perl(URI::Escape) on pure rhel, enable tests + * Mon May 04 2020 Rex Dieter - 5.70.0-1 - 5.70.0