Blame SOURCES/macros.qt5

ee5ffe
%_qt5_prefix %{_prefix}
ee5ffe
%_qt5_archdatadir %{_libdir}/qt5
ee5ffe
%_qt5_bindir %{_libdir}/qt5/bin
ee5ffe
%_qt5_datadir %{_datadir}/qt5
ee5ffe
%_qt5_docdir %{_docdir}/qt5
ee5ffe
%_qt5_examplesdir %{_qt5_archdatadir}/examples
ee5ffe
%_qt5_headerdir %{_includedir}/qt5
ee5ffe
%_qt5_includedir %{_includedir}/qt5
ee5ffe
%_qt5_importdir %{_qt5_archdatadir}/imports
ee5ffe
%_qt5_libdir %{_libdir}
ee5ffe
%_qt5_libexecdir %{_qt5_archdatadir}/libexec
ee5ffe
%_qt5_plugindir %{_qt5_archdatadir}/plugins
ee5ffe
%_qt5_qmldir %{_qt5_archdatadir}/qml
ee5ffe
%_qt5_qmake @@QMAKE@@
ee5ffe
%_qt5_settingsdir %{_sysconfdir}/xdg
ee5ffe
%_qt5_sysconfdir %{_qt5_settingsdir}
ee5ffe
%_qt5_translationdir %{_datadir}/qt5/translations
ee5ffe
ee5ffe
%_qt5_cflags %{nil}@@QT5_CFLAGS@@
ee5ffe
%_qt5_cxxflags %{nil}@@QT5_CXXFLAGS@@
ee5ffe
%_qt5_ldflags %{nil}%{?__global_ldflags} @@QT5_RPM_LD_FLAGS@@
ee5ffe
%_qt5_optflags %{optflags} @@QT5_RPM_OPT_FLAGS@@
ee5ffe
ee5ffe
%_qt5_qmake_flags \\\
ee5ffe
  QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt5_optflags} %{?_qt5_cflags}}" \\\
ee5ffe
  QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt5_optflags} %{?_qt5_cflags}}" \\\
ee5ffe
  QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt5_optflags} %{?_qt5_cxxflags}}" \\\
ee5ffe
  QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt5_optflags} %{?_qt5_cxxflags}}" \\\
ee5ffe
  QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt5_ldflags}}" \\\
ee5ffe
  QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt5_ldflags}}" \\\
ee5ffe
  QMAKE_STRIP=
ee5ffe
ee5ffe
%qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags}
ee5ffe
ee5ffe
%qmake_qt5_wrapper @@QMAKE_QT5_WRAPPER@@
ee5ffe
ee5ffe
%qt5_build_tests \
ee5ffe
  make sub-tests %{?_smp_mflags} -k ||:
ee5ffe
ee5ffe
%qt5_install_tests \
ee5ffe
  mkdir -p %{buildroot}%{_qt5_libdir}/qt5                                              \
ee5ffe
  find ./tests -not -path '*/\.*' -type d | while read LINE                            \
ee5ffe
  do                                                                                   \
ee5ffe
      mkdir -p "%{buildroot}%{_qt5_libdir}/qt5/$LINE"                                  \
ee5ffe
  done                                                                                 \
ee5ffe
  find ./tests -not -path '*/\.*'                                                       \\\
ee5ffe
               -not -name '*.h'                                                        \\\
ee5ffe
               -not -name '*.cpp'                                                      \\\
ee5ffe
               -not -name '*.pro'                                                      \\\
ee5ffe
               -not -name 'uic_wrapper.sh'                                             \\\
ee5ffe
               -not -name 'target_wrapper.sh'                                          \\\
ee5ffe
               -not -name 'Makefile'                                                   \\\
ee5ffe
               -type f | while read LINE                                               \
ee5ffe
  do                                                                                   \
ee5ffe
      if grep --quiet "#\\!\\ */usr/bin/env\\ python[23]\\{1\\}\\|#\\!\\ */usr/bin/env\\ python$\\|#\\!/usr/bin/python$" "$LINE" \
ee5ffe
      then                                                                             \
ee5ffe
          sed -i s@\\/usr\\/bin\\/python\\$@\\/usr\\/bin\\/python3@ "$LINE"            \
ee5ffe
          sed -i s@\\/usr\\/bin\\/env\\ python2\\$@\\/usr\\/bin\\/python2@ "$LINE"     \
ee5ffe
          sed -i s@\\/usr\\/bin\\/env\\ python3\\$@\\/usr\\/bin\\/python3@ "$LINE"     \
ee5ffe
          sed -i s@\\/usr\\/bin\\/env\\ python\\$@\\/usr\\/bin\\/python3@ "$LINE"      \
ee5ffe
      fi                                                                               \
ee5ffe
      cp -r --parents "$LINE" %{buildroot}%{_qt5_libdir}/qt5/                          \
ee5ffe
  done                                                                                 \