provide qmake-qt5.sh wrapper and new macro: %qmake_qt5_wrapper

This commit is contained in:
Rex Dieter 2018-01-24 14:21:06 -06:00
parent 03c64f0ad4
commit d9172949ad
3 changed files with 25 additions and 1 deletions

View File

@ -31,3 +31,5 @@
QMAKE_STRIP= QMAKE_STRIP=
%qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags} %qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags}
%qmake_qt5_wrapper %{_qt5_bindir}/qmake-qt5.sh

10
qmake-qt5.sh Executable file
View File

@ -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 $@

View File

@ -1,12 +1,13 @@
Name: qt5 Name: qt5
Version: 5.10.0 Version: 5.10.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Qt5 meta package Summary: Qt5 meta package
License: GPLv3 License: GPLv3
URL: https://getfedora.org/ URL: https://getfedora.org/
Source0: macros.qt5 Source0: macros.qt5
Source1: macros.qt5-srpm Source1: macros.qt5-srpm
Source2: qmake-qt5.sh
BuildArch: noarch BuildArch: noarch
Requires: qt5-qdbusviewer Requires: qt5-qdbusviewer
@ -96,6 +97,12 @@ Summary: RPM macros for source Qt5 packages
%install %install
install -Dpm644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt5 install -Dpm644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt5
install -Dpm644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt5-srpm 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 # substitute custom flags
sed -i \ sed -i \
@ -118,12 +125,17 @@ echo "- Qt5 devel meta package" > %{buildroot}%{_docdir}/qt5-devel/README
%files rpm-macros %files rpm-macros
%{_rpmconfigdir}/macros.d/macros.qt5 %{_rpmconfigdir}/macros.d/macros.qt5
%{_libdir}/qt5/bin/qmake-qt5.sh
%{_libdir}/qt5/bin/wrappers/
%files srpm-macros %files srpm-macros
%{_rpmconfigdir}/macros.d/macros.qt5-srpm %{_rpmconfigdir}/macros.d/macros.qt5-srpm
%changelog %changelog
* Wed Jan 24 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.10.0-2
- provide qmake-qt5.sh wrapper and new macro: %%qmake_qt5_wrapper
* Wed Jan 03 2018 Rex Dieter <rdieter@fedoraproject.org> 5.10.0-1 * Wed Jan 03 2018 Rex Dieter <rdieter@fedoraproject.org> 5.10.0-1
- 5.10.0 - 5.10.0