From 06538e159a8adb7f5c5160e3e7c73901f299f712 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 30 Jul 2019 07:43:53 -0500 Subject: [PATCH] Adjustment to flatpak tweak. --- python-qt5.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python-qt5.spec b/python-qt5.spec index 25fb8bd..d496059 100644 --- a/python-qt5.spec +++ b/python-qt5.spec @@ -318,12 +318,17 @@ popd # Python 3 build: %if 0%{?with_python3} %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-python3 +if [ "%{_prefix}" != "/usr" ]; then + cp -ru %{buildroot}/usr/* %{buildroot}%{_prefix}/ + rm -rf %{buildroot}/usr/* +fi %if "%py3_sipdir" == "%{_datadir}/sip/PyQt5" # copy files to old location for compat purposes temporarily mkdir -p %{buildroot}%{_datadir}/python3-sip cp -alf %{buildroot}%{py3_sipdir} \ %{buildroot}%{_datadir}/python3-sip/PyQt5 %endif + # ensure .so modules are executable for proper -debuginfo extraction for i in %{buildroot}%{python3_sitearch}/PyQt5/*.so %{buildroot}%{python3_dbus_dir}/pyqt5.so ; do test -x $i || chmod a+rx $i @@ -333,6 +338,10 @@ done # Python 2 build: %if 0%{?with_python2} %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +if [ "%{_prefix}" != "/usr" ]; then + cp -ru %{buildroot}/usr/* %{buildroot}%{_prefix}/ + rm -rf %{buildroot}/usr/* +fi # ensure .so modules are executable for proper -debuginfo extraction for i in %{buildroot}%{python2_sitearch}/PyQt5/*.so %{buildroot}%{python2_dbus_dir}/pyqt5.so ; do test -x $i || chmod a+rx $i