2021-01-22 08:41:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
%_qt6_build_type RelWithDebInfo
|
|
|
|
%_qt6_build_tool ninja
|
|
|
|
|
|
|
|
%_qt6_prefix %{_prefix}
|
|
|
|
%_qt6_archdatadir %{_libdir}/qt6
|
|
|
|
%_qt6_bindir %{_libdir}/qt6/bin
|
|
|
|
%_qt6_datadir %{_datadir}/qt6
|
2024-12-05 13:49:17 +00:00
|
|
|
%_qt6_descriptionsdir %{_qt6_archdatadir}/modules
|
2021-01-22 08:41:44 +00:00
|
|
|
%_qt6_docdir %{_docdir}/qt6
|
|
|
|
%_qt6_examplesdir %{_qt6_archdatadir}/examples
|
|
|
|
%_qt6_headerdir %{_includedir}/qt6
|
|
|
|
%_qt6_includedir %{_includedir}/qt6
|
|
|
|
%_qt6_importdir %{_qt6_archdatadir}/imports
|
|
|
|
%_qt6_libdir %{_libdir}
|
|
|
|
%_qt6_libexecdir %{_qt6_archdatadir}/libexec
|
2024-12-05 13:49:17 +00:00
|
|
|
%_qt6_metatypesdir %{_qt6_archdatadir}/metatypes
|
2021-01-22 08:41:44 +00:00
|
|
|
%_qt6_mkspecsdir %{_qt6_archdatadir}/mkspecs
|
|
|
|
%_qt6_plugindir %{_qt6_archdatadir}/plugins
|
|
|
|
%_qt6_qmldir %{_qt6_archdatadir}/qml
|
|
|
|
%_qt6_qmake @@QMAKE@@
|
|
|
|
%_qt6_settingsdir %{_sysconfdir}/xdg
|
|
|
|
%_qt6_sysconfdir %{_qt6_settingsdir}
|
|
|
|
%_qt6_translationdir %{_datadir}/qt6/translations
|
|
|
|
|
|
|
|
%_qt6_cflags %{nil}@@QT6_CFLAGS@@
|
|
|
|
%_qt6_cxxflags %{nil}@@QT6_CXXFLAGS@@
|
|
|
|
%_qt6_ldflags %{nil}%{?__global_ldflags} @@QT6_RPM_LD_FLAGS@@
|
|
|
|
%_qt6_optflags %{optflags} @@QT6_RPM_OPT_FLAGS@@
|
|
|
|
|
|
|
|
%_qt6_qmake_flags \\\
|
|
|
|
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt6_optflags} %{?_qt6_cflags}}" \\\
|
|
|
|
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt6_optflags} %{?_qt6_cflags}}" \\\
|
|
|
|
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt6_optflags} %{?_qt6_cxxflags}}" \\\
|
|
|
|
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt6_optflags} %{?_qt6_cxxflags}}" \\\
|
|
|
|
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt6_ldflags}}" \\\
|
|
|
|
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt6_ldflags}}" \\\
|
|
|
|
QMAKE_STRIP=
|
|
|
|
|
|
|
|
%qmake_qt6 %{_qt6_qmake} %{?_qt6_qmake_flags}
|
|
|
|
|
|
|
|
%qmake_qt6_wrapper @@QMAKE_QT6_WRAPPER@@
|
|
|
|
|
|
|
|
%cmake_qt6 \
|
|
|
|
%cmake -DCMAKE_BUILD_TYPE=%{_qt6_build_type} \\\
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_qt6_prefix} \\\
|
|
|
|
%if "%_qt6_build_tool" == "ninja" \
|
|
|
|
-GNinja \\\
|
|
|
|
%else \
|
|
|
|
-G"Unix Makefiles" \\\
|
|
|
|
%endif \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_qt6_prefix} \\\
|
|
|
|
-DINSTALL_ARCHDATADIR=%{_qt6_archdatadir} \\\
|
|
|
|
-DINSTALL_BINDIR=%{_qt6_bindir} \\\
|
|
|
|
-DINSTALL_LIBDIR=%{_qt6_libdir} \\\
|
2021-05-24 06:22:25 +00:00
|
|
|
-DINSTALL_LIBEXECDIR=%{_qt6_libexecdir} \\\
|
2021-01-22 08:41:44 +00:00
|
|
|
-DINSTALL_DATADIR=%{_qt6_datadir} \\\
|
|
|
|
-DINSTALL_DOCDIR=%{_qt6_docdir} \\\
|
|
|
|
-DINSTALL_INCLUDEDIR=%{_qt6_headerdir} \\\
|
|
|
|
-DINSTALL_EXAMPLESDIR=%{_qt6_examplesdir} \\\
|
|
|
|
-DINSTALL_MKSPECSDIR=%{_qt6_mkspecsdir} \\\
|
|
|
|
-DINSTALL_PLUGINSDIR=%{_qt6_plugindir} \\\
|
|
|
|
-DINSTALL_QMLDIR=%{_qt6_qmldir} \\\
|
|
|
|
-DINSTALL_SYSCONFDIR=%{_qt6_sysconfdir} \\\
|
2021-02-04 07:14:20 +00:00
|
|
|
-DINSTALL_TRANSLATIONSDIR=%{_qt6_translationdir} \\\
|
|
|
|
-DQT_DISABLE_RPATH=TRUE
|
2024-03-27 09:50:13 +00:00
|
|
|
|
2024-04-10 15:16:34 +00:00
|
|
|
%qt6_fix_tests \
|
|
|
|
pushd tests/auto \
|
|
|
|
find . -type f -name 'CMakeLists.txt' \\\
|
|
|
|
-exec sed -i 's|\\\(.*DIR="*\\\)${CMAKE_CURRENT_SOURCE_DIR}/\\\(.*\\\)|\\\1\\\2|' {} \\\; \\\
|
|
|
|
-exec sed -i 's|\\\(.*DIR="*\\\)${CMAKE_CURRENT_SOURCE_DIR}\\\(.*\\\)|\\\1.\\\2|' {} \\\; \
|
|
|
|
find . -type f \\\( -name '*.sh' -o -name '*.py' \\\) \\\
|
|
|
|
-exec sed -i 's|/usr/bin/python$|/usr/bin/python3|' {} \\\; \\\
|
|
|
|
-exec sed -i 's|/usr/bin/env\\\ python3*|/usr/bin/python3|' {} \\\; \\\
|
|
|
|
-exec sed -i 's|^/bin/sh$|!#/bin/sh|' {} \\\; \
|
|
|
|
popd \
|
2024-03-27 09:50:13 +00:00
|
|
|
|
2024-04-10 15:16:34 +00:00
|
|
|
%qt6_dont_autoinstall_tests \
|
|
|
|
sed -i 's|include(".*tests/cmake_install.cmake")||' %_vpath_srcdir/%_vpath_builddir/cmake_install.cmake \
|
2024-03-27 09:50:13 +00:00
|
|
|
|
|
|
|
%qt6_install_tests \
|
|
|
|
mkdir -p %{buildroot}%{_qt6_archdatadir}/tests \
|
|
|
|
pushd tests/auto \
|
|
|
|
find . -type f \\\
|
|
|
|
! -path '*/.*' \\\
|
2024-06-06 10:47:35 +00:00
|
|
|
-exec cp -r --parents {} %{buildroot}%{_qt6_archdatadir}/tests \\\; \ \
|
2024-03-27 09:50:13 +00:00
|
|
|
popd \
|
|
|
|
pushd %_vpath_srcdir/%_vpath_builddir/tests/auto \
|
|
|
|
find . -type f -executable \\\
|
2024-04-09 13:49:28 +00:00
|
|
|
-exec chrpath --delete {} \\\; \\\
|
2024-03-27 09:50:13 +00:00
|
|
|
-exec cp -r --parents {} %{buildroot}%{_qt6_archdatadir}/tests \\\; \
|
|
|
|
popd \
|