From 11bf885815f1080b75aafe4cf1ffcb8703292a31 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 4 Dec 2023 19:16:59 -0500 Subject: [PATCH] Auto-generate qt6qml() virtual provides --- qt6.spec | 15 ++++++++++++--- qt6qml.attr | 2 ++ qt6qml.prov | 6 ++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 qt6qml.attr create mode 100755 qt6qml.prov diff --git a/qt6.spec b/qt6.spec index 55f85de..75b6268 100644 --- a/qt6.spec +++ b/qt6.spec @@ -1,13 +1,15 @@ Name: qt6 Version: 6.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Qt6 meta package License: GPL-3.0-only URL: https://getfedora.org/ Source0: macros.qt6 Source1: macros.qt6-srpm Source2: qmake-qt6.sh +Source3: qt6qml.attr +Source4: qt6qml.prov BuildArch: noarch Requires: qt6-qt3d @@ -99,9 +101,11 @@ Summary: RPM macros for source Qt6 packages %install -install -Dpm644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt6 -install -Dpm644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.qt6-srpm +install -Dpm644 %{SOURCE0} %{buildroot}%{_rpmmacrodir}/macros.qt6 +install -Dpm644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.qt6-srpm install -Dpm755 %{SOURCE2} %{buildroot}%{_bindir}/qmake-qt6.sh +install -Dpm644 %{SOURCE3} %{buildroot}%{_fileattrsdir}/qt6qml.attr +install -Dpm644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/qt6qml.prov mkdir -p %{buildroot}%{_datadir}/qt6/wrappers ln -s %{_bindir}/qmake-qt6.sh %{buildroot}%{_datadir}/qt6/wrappers/qmake-qt6 ln -s %{_bindir}/qmake-qt6.sh %{buildroot}%{_datadir}/qt6/wrappers/qmake @@ -133,6 +137,8 @@ echo "- Qt6 devel meta package" > %{buildroot}%{_docdir}/qt6-devel/README %endif %files rpm-macros +%{_fileattrsdir}/qt6qml.attr +%{_rpmconfigdir}/qt6qml.prov %{_rpmmacrodir}/macros.qt6 %{_bindir}/qmake-qt6.sh %{_datadir}/qt6/wrappers/ @@ -142,6 +148,9 @@ echo "- Qt6 devel meta package" > %{buildroot}%{_docdir}/qt6-devel/README %changelog +* Tue Dec 05 2023 Yaakov Selkowitz - 6.6.1-2 +- Auto-generate qt6qml() virtual provides + * Mon Nov 27 2023 Jan Grulich - 6.6.1-1 - 6.6.1 diff --git a/qt6qml.attr b/qt6qml.attr new file mode 100644 index 0000000..567c298 --- /dev/null +++ b/qt6qml.attr @@ -0,0 +1,2 @@ +%__qt6qml_path ^%{_qt6_qmldir}(/[^/]+)+/qmldir$ +%__qt6qml_provides %{_rpmconfigdir}/qt6qml.prov diff --git a/qt6qml.prov b/qt6qml.prov new file mode 100755 index 0000000..cce4b50 --- /dev/null +++ b/qt6qml.prov @@ -0,0 +1,6 @@ +#! /bin/sh + +grep '/qt6/qml/.*/qmldir$' | +while read fn; do + sed -ne "s/^module \(.*\)/qt6qml(\1)/p" "${fn}" +done