python: support on f29+ again, add Obsoletes otherwise (like s390x) (#1610422)

use make again (macro'ize ninja support)
.spec cosmetics (whitespace mostly)
epel8
Rex Dieter 7 years ago
parent be754b495f
commit 586bf69389

@ -4,15 +4,20 @@
#global bootstrap 1
%if !0%{?bootstrap}
%if 0%{?fedora} && 0%{?fedora} < 28
# FIXME/TODO: sip currently segfaults on s390x
%ifnarch s390x
%global python 1
%endif
#endif
%global tests 1
%endif
# use ninja instead of make
#global ninja 1
Name: kf5-%{framework}
Version: 5.48.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system
License: GPLv2+ and LGPLv2+ and MIT
@ -30,7 +35,10 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framewo
## upstream patches
## upstreamable patches
%if 0%{?ninja}
BuildRequires: ninja-build
%endif
BuildRequires: extra-cmake-modules >= %{majmin}
BuildRequires: kf5-rpm-macros >= %{majmin}
@ -49,6 +57,10 @@ BuildRequires: python2-clang
BuildRequires: clang
BuildRequires: python2-PyQt5-devel
BuildRequires: python3-PyQt5-devel
%else
Obsoletes: python2-pykf5-%{framework} < %{version}-%{release}
Obsoletes: python3-pykf5-%{framework} < %{version}-%{release}
Obsoletes: pykf5-%{framework}-devel < %{version}-%{release}
%endif
%if 0%{?tests}
@ -122,17 +134,24 @@ export PYTHONPATH
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} -G Ninja .. \
%{cmake_kf5} .. \
%{?ninja:-G Ninja} \
%{?tests:-DBUILD_TESTING:BOOL=ON}
popd
#make_build -C %{_target_platform}
%if 0%{?ninja}
%ninja_build -C %{_target_platform}
%else
%make_build -C %{_target_platform}
%endif
%install
#make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%if 0%{?ninja}
%ninja_install -C %{_target_platform}
%else
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%endif
%find_lang_kf5 kconfig5_qt
@ -140,12 +159,13 @@ popd
%check
%if 0%{?tests}
export CTEST_OUTPUT_ON_FAILURE=1
## cant use %%ninja_test here for some reason, doesn't inherit env vars from xvfb or dbus -- rex
xvfb-run -a \
dbus-launch --exit-with-session \
%if 0%{?ninja}
ninja test -v -C %{_target_platform} ||:
## cant use %%ninja_test here for some reason, doesn't inherit evn vars from xvfb or dbus -- rex
#make test ARGS="--output-on-failure --timeout 300"
%else
make test ARGS="--output-on-failure --timeout 300"
%endif
%endif
@ -190,6 +210,11 @@ ninja test -v -C %{_target_platform} ||:
%changelog
* Wed Aug 01 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.48.0-3
- python: support on f29+ again, add Obsoletes otherwise (like s390x) (#1610422)
- use make again (macro'ize ninja support)
- .spec cosmetics (whitespace mostly)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.48.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

Loading…
Cancel
Save