|
|
0626210 |
%{?mingw_package_header}
|
|
|
0626210 |
|
|
|
0626210 |
# Disable debuginfo subpackages and debugsource packages for now to use old logic
|
|
|
0626210 |
%undefine _debugsource_packages
|
|
|
0626210 |
%undefine _debuginfo_subpackages
|
|
|
0626210 |
|
|
|
0626210 |
# Override the __debug_install_post argument as this package
|
|
|
0626210 |
# contains both native as well as cross compiled binaries
|
|
|
0626210 |
%global __debug_install_post %%{mingw_debug_install_post}; %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%%{?buildsubdir}" %{nil}
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%global native_dir %{_builddir}/native-%{name}-%{version}-%{release}
|
|
|
0626210 |
%global win64_dir %{_builddir}/mingw64-%{name}-%{version}-%{release}
|
|
|
0626210 |
|
|
|
0626210 |
%global pkgname python-qt5
|
|
|
0626210 |
%global qt_ver 5.9.1
|
|
|
0626210 |
|
|
|
0626210 |
Name: mingw-%{pkgname}
|
|
|
0626210 |
Summary: MinGW Windows PyQt5
|
|
|
0626210 |
Version: 5.9
|
|
|
004cf8b |
Release: 4%{?dist}
|
|
|
0626210 |
|
|
|
0626210 |
# GPLv2 exceptions(see GPL_EXCEPTIONS*.txt)
|
|
|
0626210 |
License: (GPLv3 or GPLv2 with exceptions) and BSD
|
|
|
0626210 |
Url: http://www.riverbankcomputing.com/software/pyqt/
|
|
|
0626210 |
Source0: http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-%{version}/PyQt5_gpl-%{version}.zip
|
|
|
0626210 |
# Tweak configure for cross build
|
|
|
0626210 |
Patch0: PyQt5_configure.patch
|
|
|
0626210 |
# Hack in WS_WIN instead of WS_X11 in sip-flags
|
|
|
0626210 |
Patch1: PyQt5_wswin.patch
|
|
|
0626210 |
|
|
|
0626210 |
BuildRequires: python2-devel
|
|
|
0626210 |
BuildRequires: sip-devel
|
|
|
0626210 |
BuildRequires: qt5-qtbase-devel >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: qt5-qtsvg-devel >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: qt5-qttools-devel >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: qt5-qtwebkit-devel >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: qt5-qtxmlpatterns-devel >= %{qt_ver}
|
|
|
0626210 |
|
|
|
004cf8b |
BuildRequires: mingw32-filesystem >= 102
|
|
|
0626210 |
BuildRequires: mingw32-gcc-c++
|
|
|
0626210 |
BuildRequires: mingw32-python2
|
|
|
0626210 |
BuildRequires: mingw32-qt5-qtbase >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw32-qt5-qtsvg >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw32-qt5-qttools >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw32-qt5-qtwebkit >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw32-qt5-qtxmlpatterns >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw32-sip
|
|
|
0626210 |
|
|
|
004cf8b |
BuildRequires: mingw64-filesystem >= 102
|
|
|
0626210 |
BuildRequires: mingw64-gcc-c++
|
|
|
0626210 |
BuildRequires: mingw64-python2
|
|
|
0626210 |
BuildRequires: mingw64-qt5-qtbase >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw64-qt5-qtsvg >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw64-qt5-qttools >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw64-qt5-qtwebkit >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw64-qt5-qtxmlpatterns >= %{qt_ver}
|
|
|
0626210 |
BuildRequires: mingw64-sip
|
|
|
0626210 |
|
|
|
0626210 |
%description
|
|
|
0626210 |
MinGW Windows PyQt5
|
|
|
0626210 |
|
|
|
0626210 |
%package -n mingw32-python2-qt5
|
|
|
0626210 |
Summary: MinGW Windows Python2-Qt5
|
|
|
0626210 |
Requires: qt5-qtbase = %{qt_ver}
|
|
|
0626210 |
Requires: sip
|
|
|
0626210 |
Requires: mingw32-qt5-qtbase >= %{qt_ver}
|
|
|
0626210 |
Requires: mingw32-qt5-qttools >= %{qt_ver}
|
|
|
0626210 |
Requires: mingw32-sip
|
|
|
0626210 |
|
|
|
0626210 |
%description -n mingw32-python2-qt5
|
|
|
0626210 |
MinGW Windows Python2-Qt5
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%package -n mingw64-python2-qt5
|
|
|
0626210 |
Summary: MinGW Windows Python2-Qt5
|
|
|
0626210 |
Requires: qt5-qtbase = %{qt_ver}
|
|
|
0626210 |
Requires: sip
|
|
|
0626210 |
Requires: mingw64-qt5-qtbase >= %{qt_ver}
|
|
|
0626210 |
Requires: mingw64-qt5-qttools >= %{qt_ver}
|
|
|
0626210 |
Requires: mingw64-sip
|
|
|
0626210 |
|
|
|
0626210 |
%description -n mingw64-python2-qt5
|
|
|
0626210 |
MinGW Windows Python2-Qt5
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%{?mingw_debug_package}
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%prep
|
|
|
0626210 |
%setup -q -n PyQt5_gpl-%{version}
|
|
|
0626210 |
|
|
|
0626210 |
rm -rf %{native_dir}
|
|
|
0626210 |
cp -a . %{native_dir}
|
|
|
0626210 |
pushd %{native_dir}
|
|
|
0626210 |
%patch1 -p1
|
|
|
0626210 |
popd
|
|
|
0626210 |
|
|
|
0626210 |
%patch0 -p1
|
|
|
0626210 |
rm -rf %{win64_dir}
|
|
|
0626210 |
cp -a . %{win64_dir}
|
|
|
0626210 |
|
|
|
0626210 |
%build
|
|
|
0626210 |
PREFIX=%{mingw32_prefix} mingw32-python configure.py \
|
|
|
0626210 |
--assume-shared \
|
|
|
0626210 |
--confirm-license \
|
|
|
0626210 |
--sip=/usr/bin/mingw32-sip \
|
|
|
0626210 |
--qmake=%{mingw32_qmake_qt5} \
|
|
|
0626210 |
--no-qsci-api \
|
|
|
0626210 |
--verbose
|
|
|
0626210 |
|
|
|
0626210 |
%mingw32_make %{?_smp_mflags}
|
|
|
0626210 |
|
|
|
0626210 |
(
|
|
|
0626210 |
cd %{win64_dir}
|
|
|
0626210 |
PREFIX=%{mingw64_prefix} mingw64-python configure.py \
|
|
|
0626210 |
--assume-shared \
|
|
|
0626210 |
--confirm-license \
|
|
|
0626210 |
--sip=/usr/bin/mingw64-sip \
|
|
|
0626210 |
--qmake=%{mingw64_qmake_qt5} \
|
|
|
0626210 |
--no-qsci-api \
|
|
|
0626210 |
--verbose
|
|
|
0626210 |
|
|
|
0626210 |
%mingw64_make %{?_smp_mflags}
|
|
|
0626210 |
)
|
|
|
0626210 |
|
|
|
0626210 |
(
|
|
|
0626210 |
cd %{native_dir}
|
|
|
0626210 |
%{__python2} configure.py \
|
|
|
0626210 |
--assume-shared \
|
|
|
0626210 |
--confirm-license \
|
|
|
0626210 |
--qmake=%{_qt5_qmake} \
|
|
|
0626210 |
--no-qsci-api \
|
|
|
0626210 |
--verbose
|
|
|
0626210 |
|
|
|
0626210 |
%make_build
|
|
|
0626210 |
)
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%install
|
|
|
0626210 |
%mingw32_make install INSTALL_ROOT=%{buildroot}
|
|
|
0626210 |
%mingw32_make install INSTALL_ROOT=%{buildroot} -C %{win64_dir}
|
|
|
0626210 |
%mingw32_make install INSTALL_ROOT=%{buildroot} -C %{native_dir}
|
|
|
0626210 |
|
|
|
0626210 |
# Remove Python 3 code from Python 2.x directory
|
|
|
0626210 |
rm -rf %{buildroot}%{mingw32_python2_sitearch}/PyQt5/uic/port_v3/
|
|
|
0626210 |
rm -rf %{buildroot}%{mingw64_python2_sitearch}/PyQt5/uic/port_v3/
|
|
|
0626210 |
rm -rf %{buildroot}%{python2_sitearch}/PyQt5/uic/port_v3/
|
|
|
0626210 |
|
|
|
0626210 |
# Move native build to host libs
|
|
|
0626210 |
find %{buildroot}%{python2_sitearch}/PyQt5/ -type f -name '*.so' -exec chmod +x {} \;
|
|
|
0626210 |
mkdir -p %{buildroot}%{_prefix}/%{mingw32_target}/lib/python2.7/site-packages/
|
|
|
0626210 |
mkdir -p %{buildroot}%{_prefix}/%{mingw64_target}/lib/python2.7/site-packages/
|
|
|
0626210 |
cp -a %{buildroot}%{python2_sitearch}/PyQt5 %{buildroot}%{_prefix}/%{mingw32_target}/lib/python2.7/site-packages/PyQt5
|
|
|
0626210 |
cp -a %{buildroot}%{python2_sitearch}/PyQt5 %{buildroot}%{_prefix}/%{mingw64_target}/lib/python2.7/site-packages/PyQt5
|
|
|
0626210 |
|
|
|
0626210 |
# Remove pylupdate, pyuic and pyrcc shell scripts
|
|
|
0626210 |
rm -f %{buildroot}%{mingw32_bindir}/py{lupdate,rcc,uic}5
|
|
|
0626210 |
rm -f %{buildroot}%{mingw64_bindir}/py{lupdate,rcc,uic}5
|
|
|
0626210 |
|
|
|
0626210 |
# Remove unused stuff
|
|
|
0626210 |
rm -rf %{buildroot}%{_libdir}
|
|
|
0626210 |
rm -rf %{buildroot}%{_bindir}
|
|
|
0626210 |
rm -rf %{buildroot}%{_datadir}
|
|
|
0626210 |
|
|
|
004cf8b |
# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly)
|
|
|
004cf8b |
find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-%{pkgname}.debugfiles
|
|
|
004cf8b |
find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-%{pkgname}.debugfiles
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
004cf8b |
%files -n mingw32-python2-qt5 -f mingw32-%{pkgname}.debugfiles
|
|
|
0626210 |
%license LICENSE
|
|
|
0626210 |
%{_prefix}/%{mingw32_target}/lib/python2.7/site-packages/PyQt5/
|
|
|
0626210 |
%{mingw32_python2_sitearch}/PyQt5/
|
|
|
0626210 |
%{mingw32_libdir}/qt5/plugins/designer/pyqt5.dll
|
|
|
0626210 |
%{mingw32_libdir}/qt5/plugins/PyQt5/
|
|
|
0626210 |
%{mingw32_datadir}/sip/PyQt5
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
004cf8b |
%files -n mingw64-python2-qt5 -f mingw64-%{pkgname}.debugfiles
|
|
|
0626210 |
%license LICENSE
|
|
|
0626210 |
%{_prefix}/%{mingw64_target}/lib/python2.7/site-packages/PyQt5/
|
|
|
0626210 |
%{mingw64_python2_sitearch}/PyQt5/
|
|
|
0626210 |
%{mingw64_libdir}/qt5/plugins/designer/pyqt5.dll
|
|
|
0626210 |
%{mingw64_libdir}/qt5/plugins/PyQt5/
|
|
|
0626210 |
%{mingw64_datadir}/sip/PyQt5
|
|
|
0626210 |
|
|
|
0626210 |
|
|
|
0626210 |
%changelog
|
|
|
004cf8b |
* Tue Sep 19 2017 Sandro Mani <manisandro@gmail.com> - 5.9-4
|
|
|
004cf8b |
- Rebuild (mingw-filesystem)
|
|
|
004cf8b |
|
|
|
0626210 |
* Tue Sep 05 2017 Sandro Mani <manisandro@gmail.com> - 5.9-3
|
|
|
0626210 |
- Require mingw{32,64}-qt5-qttools for directory ownership
|
|
|
0626210 |
|
|
|
0626210 |
* Wed Aug 09 2017 Sandro Mani <manisandro@gmail.com> - 5.9-2
|
|
|
0626210 |
- Bump qt_ver to 5.9.1
|
|
|
0626210 |
|
|
|
0626210 |
* Tue Jul 11 2017 Sandro Mani <manisandro@gmail.com> - 5.9-1
|
|
|
0626210 |
- Update to 5.9
|
|
|
0626210 |
|
|
|
0626210 |
* Sat May 06 2017 Sandro Mani <manisandro@gmail.com> - 5.8.2-1
|
|
|
0626210 |
- Initial package
|