qt5/SOURCES/macros.qt5

64 lines
3.4 KiB
Plaintext

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