From d9172949ad3ad54908de9ecfd41bf125f8f83447 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 24 Jan 2018 14:21:06 -0600 Subject: [PATCH] provide qmake-qt5.sh wrapper and new macro: %qmake_qt5_wrapper --- macros.qt5 | 2 ++ qmake-qt5.sh | 10 ++++++++++ qt5.spec | 14 +++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 qmake-qt5.sh diff --git a/macros.qt5 b/macros.qt5 index b7a4305..c161169 100644 --- a/macros.qt5 +++ b/macros.qt5 @@ -31,3 +31,5 @@ QMAKE_STRIP= %qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags} + +%qmake_qt5_wrapper %{_qt5_bindir}/qmake-qt5.sh diff --git a/qmake-qt5.sh b/qmake-qt5.sh new file mode 100755 index 0000000..d41c382 --- /dev/null +++ b/qmake-qt5.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# An attempt at providing a qmake wrapper for projects that +# lack native qmake support (ie, qmake is run by buildsystem +# instead of developer or fedora packager). + +QMAKE="$(rpm --eval %{_qt5_qmake})" +QMAKE_FLAGS="$(rpm --eval %{?_qt5_qmake_flags})" + +eval $QMAKE $QMAKE_FLAGS $@ diff --git a/qt5.spec b/qt5.spec index f541bff..a23bd08 100644 --- a/qt5.spec +++ b/qt5.spec @@ -1,12 +1,13 @@ Name: qt5 Version: 5.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Qt5 meta package License: GPLv3 URL: https://getfedora.org/ Source0: macros.qt5 Source1: macros.qt5-srpm +Source2: qmake-qt5.sh BuildArch: noarch Requires: qt5-qdbusviewer @@ -96,6 +97,12 @@ Summary: RPM macros for source Qt5 packages %install install -Dpm644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt5 install -Dpm644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt5-srpm +install -Dpm755 %{SOURCE2} %{buildroot}%{_libdir}/qt5/bin/qmake-qt5.sh +mkdir %{buildroot}%{_libdir}/qt5/bin/wrappers +pushd %{buildroot}%{_libdir}/qt5/bin/wrappers +ln -s ../qmake-qt5.sh qmake-qt5 +ln -s ../qmake-qt5.sh qmake +popd # substitute custom flags sed -i \ @@ -118,12 +125,17 @@ echo "- Qt5 devel meta package" > %{buildroot}%{_docdir}/qt5-devel/README %files rpm-macros %{_rpmconfigdir}/macros.d/macros.qt5 +%{_libdir}/qt5/bin/qmake-qt5.sh +%{_libdir}/qt5/bin/wrappers/ %files srpm-macros %{_rpmconfigdir}/macros.d/macros.qt5-srpm %changelog +* Wed Jan 24 2018 Rex Dieter - 5.10.0-2 +- provide qmake-qt5.sh wrapper and new macro: %%qmake_qt5_wrapper + * Wed Jan 03 2018 Rex Dieter 5.10.0-1 - 5.10.0