make qt4 conditional, no on el8+ (#1773581)

epel9
Rex Dieter 5 years ago
parent 524ea4a2fd
commit bbdbd9e6e8

@ -2,13 +2,17 @@
# trim changelog included in binary rpms # trim changelog included in binary rpms
%global _changelog_trimtime %(date +%s -d "1 year ago") %global _changelog_trimtime %(date +%s -d "1 year ago")
# build qt4 support (or not)
%if 0%{?rhel} < 8
%global qt4 1
%endif
# build qt5 support (or not) # build qt5 support (or not)
%global qt5 1 %global qt5 1
Name: qwt Name: qwt
Summary: Qt Widgets for Technical Applications Summary: Qt Widgets for Technical Applications
Version: 6.1.3 Version: 6.1.3
Release: 11%{?dist} Release: 12%{?dist}
License: LGPLv2 with exceptions License: LGPLv2 with exceptions
URL: http://qwt.sourceforge.net URL: http://qwt.sourceforge.net
@ -31,11 +35,14 @@ BuildRequires: pkgconfig(Qt5Concurrent) pkgconfig(Qt5PrintSupport) pkgconfig(Qt5
BuildRequires: pkgconfig(Qt5OpenGL) pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5OpenGL) pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Designer) BuildRequires: pkgconfig(Qt5Designer)
%endif %endif
%if 0%{?qt4}
BuildRequires: pkgconfig(QtGui) pkgconfig(QtSvg) BuildRequires: pkgconfig(QtGui) pkgconfig(QtSvg)
BuildRequires: pkgconfig(QtDesigner) BuildRequires: pkgconfig(QtDesigner)
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
%endif
# silly buildsys quirk # silly buildsys quirk
BuildConflicts: qwt-devel BuildConflicts: qwt-devel
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
Provides: qwt6 = %{version}-%{release} Provides: qwt6 = %{version}-%{release}
@ -99,20 +106,25 @@ pushd %{_target_platform}-qt5
popd popd
%endif %endif
%if 0%{?qt4}
mkdir %{_target_platform} mkdir %{_target_platform}
pushd %{_target_platform} pushd %{_target_platform}
%{qmake_qt4} QWT_CONFIG+=QwtPkgConfig .. %{qmake_qt4} QWT_CONFIG+=QwtPkgConfig ..
%make_build %make_build
popd popd
%endif
%install %install
%if 0%{?qt5} %if 0%{?qt5}
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-qt5 make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-qt5
%endif %endif
%if 0%{?qt4}
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
%endif
%if 0%{?qt4}
# fixup doc path bogosity # fixup doc path bogosity
mv %{buildroot}%{_qt4_docdir}/html/html \ mv %{buildroot}%{_qt4_docdir}/html/html \
%{buildroot}%{_qt4_docdir}/html/qwt %{buildroot}%{_qt4_docdir}/html/qwt
@ -128,8 +140,18 @@ rm -rfv %{buildroot}%{_qt5_docdir}/html/*
cp -alf %{buildroot}%{_qt4_docdir}/html/qwt/ \ cp -alf %{buildroot}%{_qt4_docdir}/html/qwt/ \
%{buildroot}%{_qt5_docdir}/html/qwt/ %{buildroot}%{_qt5_docdir}/html/qwt/
%endif %endif
%else
# fixup doc path bogosity
mv %{buildroot}%{_qt5_docdir}/html/html \
%{buildroot}%{_qt5_docdir}/html/qwt
mkdir -p %{buildroot}%{_mandir}
mv %{buildroot}%{_qt5_docdir}/html/man/man3 \
%{buildroot}%{_mandir}/
%endif
%if 0%{?qt4}
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files
@ -147,12 +169,15 @@ cp -alf %{buildroot}%{_qt4_docdir}/html/qwt/ \
%{_qt4_libdir}/qt4/mkspecs/features/qwt* %{_qt4_libdir}/qt4/mkspecs/features/qwt*
%{_qt4_libdir}/pkgconfig/qwt.pc %{_qt4_libdir}/pkgconfig/qwt.pc
%{_qt4_libdir}/pkgconfig/qwtmathml.pc %{_qt4_libdir}/pkgconfig/qwtmathml.pc
%endif
%files doc %files doc
%if 0%{?qt4}
# own these to avoid needless dep on qt/qt-doc # own these to avoid needless dep on qt/qt-doc
%dir %{_qt4_docdir} %dir %{_qt4_docdir}
%dir %{_qt4_docdir}/html/ %dir %{_qt4_docdir}/html/
%{_qt4_docdir}/html/qwt/ %{_qt4_docdir}/html/qwt/
%endif
%if 0%{?qt5} %if 0%{?qt5}
%dir %{_qt5_docdir} %dir %{_qt5_docdir}
%dir %{_qt5_docdir}/html/ %dir %{_qt5_docdir}/html/
@ -182,6 +207,9 @@ cp -alf %{buildroot}%{_qt4_docdir}/html/qwt/ \
%changelog %changelog
* Sat Nov 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 6.1.3-12
- make qt4 conditional, no on el8+ (#1773581)
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-11 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save