Blame pyqtwebengine.spec

f63c406
f63c406
%if 0%{?fedora} || 0%{?rhel} > 6
f63c406
%global with_python3 1
f63c406
%endif
7b50142
%if 0%{?fedora} < 31
f63c406
%global with_python2 1
f63c406
%endif
f63c406
f63c406
Summary: Python bindings for QtWebEngine
f63c406
Name:    pyqtwebengine
2c2ad2b
Version: 5.13.1
2c2ad2b
Release: 1%{?dist}
f63c406
f63c406
License: GPLv3
f63c406
Url:     https://www.riverbankcomputing.com/software/pyqt/
f63c406
Source0: https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/%{version}/PyQtWebEngine_gpl-%{version}.tar.gz
f63c406
ExclusiveArch: %{qt5_qtwebengine_arches}
f63c406
2c2ad2b
## downstream patches
2c2ad2b
Patch100: PyQtWebEngine_gpl-Timeline.patch
2c2ad2b
f63c406
BuildRequires: gcc-c++
f63c406
BuildRequires: pkgconfig(Qt5WebEngine)
f63c406
f63c406
%global sip_ver 4.19.14
f63c406
%if 0%{?with_python2}
f63c406
BuildRequires: python2-devel python2
f63c406
BuildRequires: python2-qt5
f63c406
BuildRequires: python2-qt5-devel
f63c406
BuildRequires: python2-pyqt5-sip >= %{sip_ver}
f63c406
BuildRequires: python2-sip-devel >= %{sip_ver}
f63c406
%endif
f63c406
%if 0%{?with_python3}
f63c406
BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}
f63c406
BuildRequires: python%{python3_pkgversion}-qt5
f63c406
BuildRequires: python%{python3_pkgversion}-qt5-devel
f63c406
BuildRequires: python%{python3_pkgversion}-pyqt5-sip >= %{sip_ver}
f63c406
BuildRequires: python%{python3_pkgversion}-sip-devel >= %{sip_ver}
f63c406
%endif # with_python3
f63c406
f63c406
%description
f63c406
%{summary}.
f63c406
f63c406
%package -n python2-qt5-webengine
f63c406
Summary: Python bindings for Qt5 WebEngine
f63c406
Requires:  python2-qt5%{?_isa}
f63c406
%{?python_provide:%python_provide python2-qt5-webengine}
f63c406
%description -n python2-qt5-webengine
f63c406
%{summary}.
f63c406
f63c406
%package -n python%{python3_pkgversion}-qt5-webengine
f63c406
Summary: Python3 bindings for Qt5 WebEngine
f63c406
Requires:  python%{python3_pkgversion}-qt5%{?_isa}
f63c406
%{?python_provide:%python_provide python%{python3_pkgversion}-qt5-webengine}
f63c406
%description -n python%{python3_pkgversion}-qt5-webengine
f63c406
%{summary}.
f63c406
f63c406
%package devel
f63c406
Summary: Development files for %{name}
f63c406
# when webengine content was split out
f63c406
Conflicts: python2-qt5-devel < 5.12.1
f63c406
Conflicts: python%{python3_pkgversion}-qt5-devel < 5.12.1
f63c406
Requires: sip
f63c406
BuildArch: noarch
f63c406
%description devel
f63c406
%{summary}.
f63c406
f63c406
%package doc
f63c406
Summary: Developer documentation for %{name}
f63c406
BuildArch: noarch
f63c406
%description doc
f63c406
%{summary}.
f63c406
f63c406
f63c406
%prep
2c2ad2b
%setup -q -n PyQtWebEngine_gpl-%{version}
2c2ad2b
2c2ad2b
%patch100 -p1
f63c406
f63c406
f63c406
%build
f63c406
PATH=%{_qt5_bindir}:$PATH ; export PATH
f63c406
f63c406
# Python 2 build:
f63c406
%if 0%{?with_python2}
f63c406
mkdir %{_target_platform}
f63c406
pushd %{_target_platform}
f63c406
%{__python2} ../configure.py \
f63c406
  --qmake=%{_qt5_qmake} \
f63c406
  --verbose \
f63c406
  QMAKE_CFLAGS_RELEASE="%{build_cflags}" \
f63c406
  QMAKE_CXXFLAGS_RELEASE="%{build_cxxflags}" \
f63c406
  QMAKE_LFLAGS_RELEASE="%{build_ldflags}"
f63c406
f63c406
%make_build
f63c406
popd
f63c406
%endif # with_python2
f63c406
f63c406
# Python 3 build:
f63c406
%if 0%{?with_python3}
f63c406
mkdir %{_target_platform}-python3
f63c406
pushd %{_target_platform}-python3
f63c406
%{__python3} ../configure.py \
f63c406
  --qmake=%{_qt5_qmake} \
f63c406
  --verbose \
f63c406
  QMAKE_CFLAGS_RELEASE="%{build_cflags}" \
f63c406
  QMAKE_CXXFLAGS_RELEASE="%{build_cxxflags}" \
f63c406
  QMAKE_LFLAGS_RELEASE="%{build_ldflags}"
f63c406
f63c406
%make_build
f63c406
popd
f63c406
%endif # with_python3
f63c406
f63c406
f63c406
%install
f63c406
f63c406
# Python 3 build:
f63c406
%if 0%{?with_python3}
f63c406
%make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-python3
7b50142
7b50142
# ensure .so modules are executable for proper -debuginfo extraction
7b50142
for i in %{buildroot}%{python3_sitearch}/PyQt5/*.so ; do
7b50142
test -x $i  || chmod a+rx $i
7b50142
done
f63c406
%endif # with_python3
f63c406
f63c406
# Python 2 build:
f63c406
%if 0%{?with_python2}
f63c406
%make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
7b50142
7b50142
# ensure .so modules are executable for proper -debuginfo extraction
7b50142
for i in %{buildroot}%{python2_sitearch}/PyQt5/*.so ; do
7b50142
test -x $i  || chmod a+rx $i
7b50142
done
7b50142
f63c406
%endif # with_python2
f63c406
f63c406
f63c406
%if 0%{?with_python2}
f63c406
%files -n python2-qt5-webengine
f63c406
%doc README
f63c406
%license LICENSE
f63c406
%{python2_sitearch}/PyQtWebEngine-%{version}.dist-info/
f63c406
%{python2_sitearch}/PyQt5/QtWebEngine.*
f63c406
%{python2_sitearch}/PyQt5/QtWebEngineCore.*
f63c406
%{python2_sitearch}/PyQt5/QtWebEngineWidgets.*
f63c406
%endif
f63c406
f63c406
%if 0%{?with_python3}
f63c406
%files -n python%{python3_pkgversion}-qt5-webengine
f63c406
%doc README
f63c406
%license LICENSE
f63c406
%{python3_sitearch}/PyQtWebEngine-%{version}.dist-info/
f63c406
%{python3_sitearch}/PyQt5/QtWebEngine.*
f63c406
%{python3_sitearch}/PyQt5/QtWebEngineCore.*
f63c406
%{python3_sitearch}/PyQt5/QtWebEngineWidgets.*
f63c406
%endif
f63c406
f63c406
%files devel
f63c406
%license LICENSE
f63c406
%{_datadir}/sip/PyQt5/QtWebEngine*/
f63c406
f63c406
%files doc
f63c406
# avoid dep on qscintilla-python, own %%_qt5_datadir/qsci/... here for now
f63c406
%dir %{_qt5_datadir}/qsci/
f63c406
%dir %{_qt5_datadir}/qsci/api/
f63c406
%dir %{_qt5_datadir}/qsci/api/python/
f63c406
%doc %{_qt5_datadir}/qsci/api/python/PyQtWebEngine.api
f63c406
f63c406
f63c406
%changelog
2c2ad2b
* Tue Oct 01 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.13.1-1
2c2ad2b
- 5.13.1
2c2ad2b
5163e4a
* Mon Aug 19 2019 Miro HronĨok <mhroncok@redhat.com> - 5.12.1-7
5163e4a
- Rebuilt for Python 3.8
5163e4a
fcbf7dd
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.12.1-6
fcbf7dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
fcbf7dd
7b50142
* Mon Jul 08 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-5
7b50142
- fix/workaround -debug generation
7b50142
- +python2 support on f30
7b50142
f63c406
* Thu Apr 11 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-4
f63c406
- -devel: %%license LICENSE
f63c406
f63c406
* Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-3
f63c406
- %%doc README
f63c406
- %%license LICENSE
f63c406
- -devel: Requires: sip
f63c406
- use %%autosetup
f63c406
f63c406
* Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-2
f63c406
- update Source0 URL
f63c406
- use ExclusiveArch
f63c406
- use %%build_cflags %%build_cxxflags %%build_ldflags
f63c406
- BR: gcc-c++
f63c406
f63c406
* Sat Mar 23 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-1
f63c406
- first try
f63c406