Accepting request 869015 from home:cgiboudeaux:Qt6:release

- Add a %pre scriplet for QCH doc packages.
 Starting with 6.0.1, the qch files are installed directly into %_qt6_docdir
 instead of %_qt6_docdir/<qch doc>.qch/.
 RPM can't upgrade packages if a directory is replaced by something
 else, we need a %pre scriptlet that will remove existing folders.

OBS-URL: https://build.opensuse.org/request/show/869015
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:6.0/qt6-macros?expand=0&rev=6
This commit is contained in:
Christophe Giboudeaux 2021-02-04 16:12:19 +00:00 committed by Git OBS Bridge
parent 676c5cb621
commit f4c7b137ca
3 changed files with 22 additions and 1 deletions

View File

@ -252,6 +252,16 @@
%qt6_install_docs \
DESTDIR=%{buildroot} cmake --build \\%{__qt6_build_options} -t install_docs_qt%{__qt6_module_name} \
# in Qt 6.0.0, %%{_qt6_docdir}/*.qch are folders which contain \
# files with the same name. \
# Starting with 6.0.1, the file is installed in %%{_qt6_docdir} directly. \
# We need a %%pre scriptlet to remove the old folder before upgrading. \
_current_dir=`pwd` \
pushd %{buildroot}%{_qt6_docdir} \
for qch_file in *.qch ; do \
echo "if [ -d %{_qt6_docdir}/${qch_file} ] ; then rm -r %{_qt6_docdir}/${qch_file} ; fi" >> ${_current_dir}/qch.pre \
done \
popd \
%{nil}
#--------------------------------------------------------------
@ -287,6 +297,8 @@ License: GFDL-1.3-or-later \
%description -n %{__qt6_doc_package_name}-qch \
This package contains documentation for %{name} in QCH format. \
\
%pre -n %{__qt6_doc_package_name}-qch -f qch.pre \
\
%files -n %{__qt6_doc_package_name}-html \
%dir %{_qt6_docdir} \
%{_qt6_docdir}/* \

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Jan 11 15:06:44 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add a %pre scriplet for QCH doc packages.
Starting with 6.0.1, the qch files are installed directly into %_qt6_docdir
instead of %_qt6_docdir/<qch doc>.qch/.
RPM can't upgrade packages if a directory is replaced by something
else, we need a %pre scriptlet that will remove existing folders.
-------------------------------------------------------------------
Sat Dec 12 18:09:56 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -17,7 +17,7 @@
Name: qt6-macros
Version: 20201210
Version: 20210111
Release: 0
Summary: RPM macros for Qt6 packages
License: MIT