pyqtwebengine-vl.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. %global with_python3 1
  2. %global with_python2 1
  3. Summary: Python bindings for QtWebEngine
  4. Name: pyqtwebengine
  5. Version: 5.12.1
  6. Release: 1%{?dist}
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: GPLv3
  10. Url: https://www.riverbankcomputing.com/software/pyqt/
  11. Source0: https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/%{version}/PyQtWebEngine_gpl-%{version}.tar.gz
  12. BuildRequires: gcc-c++
  13. BuildRequires: pkgconfig(Qt5WebEngine)
  14. %global sip_ver 4.19.14
  15. BuildRequires: qt5-rpm-macros
  16. %if 0%{?with_python2}
  17. BuildRequires: python-devel python-rpm-macros python-setuptools
  18. BuildRequires: python-enum34
  19. BuildRequires: python-qt5
  20. BuildRequires: python-qt5-base
  21. BuildRequires: python-qt5-devel
  22. BuildRequires: sip-devel >= %{sip_ver}
  23. %endif
  24. %if 0%{?with_python3}
  25. BuildRequires: python3-devel python3-rpm-macros python3-setuptools
  26. BuildRequires: python3-qt5
  27. BuildRequires: python3-qt5-base
  28. BuildRequires: python3-qt5-devel
  29. BuildRequires: python3-sip-devel >= %{sip_ver}
  30. %endif # with_python3
  31. %description
  32. %{summary}.
  33. %package -n python-qt5-webengine
  34. Summary: Python bindings for Qt5 WebEngine
  35. Requires: python-qt5%{?_isa}
  36. %{?python_provide:%python_provide python-qt5-webengine}
  37. %description -n python-qt5-webengine
  38. %{summary}.
  39. %package -n python3-qt5-webengine
  40. Summary: Python3 bindings for Qt5 WebEngine
  41. Requires: python3-qt5%{?_isa}
  42. %{?python_provide:%python_provide python3-qt5-webengine}
  43. %description -n python3-qt5-webengine
  44. %{summary}.
  45. %package devel
  46. Summary: Development files for %{name}
  47. # when webengine content was split out
  48. Conflicts: python-qt5-devel < 5.12.1
  49. Conflicts: python3-qt5-devel < 5.12.1
  50. Requires: sip
  51. BuildArch: noarch
  52. %description devel
  53. %{summary}.
  54. %package doc
  55. Summary: Developer documentation for %{name}
  56. BuildArch: noarch
  57. %description doc
  58. %{summary}.
  59. %prep
  60. %setup -q -n PyQtWebEngine_gpl-%{version}
  61. %build
  62. PATH=%{_qt5_bindir}:$PATH ; export PATH
  63. # Python 2 build:
  64. %if 0%{?with_python2}
  65. mkdir %{_target_platform}
  66. pushd %{_target_platform}
  67. %{__python} ../configure.py \
  68. --qmake=%{_qt5_qmake} \
  69. --verbose \
  70. QMAKE_CFLAGS_RELEASE="%{optflags}" \
  71. QMAKE_CXXFLAGS_RELEASE="%{optflags}" \
  72. QMAKE_LFLAGS_RELEASE="%{?build_ldflags}"
  73. %make_build
  74. popd
  75. %endif # with_python2
  76. # Python 3 build:
  77. %if 0%{?with_python3}
  78. mkdir %{_target_platform}-python3
  79. pushd %{_target_platform}-python3
  80. %{__python3} ../configure.py \
  81. --qmake=%{_qt5_qmake} \
  82. --verbose \
  83. QMAKE_CFLAGS_RELEASE="%{optflags}" \
  84. QMAKE_CXXFLAGS_RELEASE="%{optflags}" \
  85. QMAKE_LFLAGS_RELEASE="%{?build_ldflags}"
  86. %make_build
  87. popd
  88. %endif # with_python3
  89. %install
  90. rm -rf %{buildroot}
  91. # Python 3 build:
  92. %if 0%{?with_python3}
  93. %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-python3
  94. # ensure .so modules are executable for proper -debuginfo extraction
  95. for i in %{buildroot}%{python3_sitearch}/PyQt5/*.so ; do
  96. test -x $i || chmod a+rx $i
  97. done
  98. %endif # with_python3
  99. # Python 2 build:
  100. %if 0%{?with_python2}
  101. %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
  102. # ensure .so modules are executable for proper -debuginfo extraction
  103. for i in %{buildroot}%{python_sitearch}/PyQt5/*.so ; do
  104. test -x $i || chmod a+rx $i
  105. done
  106. %endif # with_python2
  107. %if 0%{?with_python2}
  108. %files -n python-qt5-webengine
  109. %doc README
  110. %license LICENSE
  111. %{python_sitearch}/PyQtWebEngine-%{version}.dist-info/
  112. %{python_sitearch}/PyQt5/QtWebEngine.*
  113. %{python_sitearch}/PyQt5/QtWebEngineCore.*
  114. %{python_sitearch}/PyQt5/QtWebEngineWidgets.*
  115. %endif
  116. %if 0%{?with_python3}
  117. %files -n python3-qt5-webengine
  118. %doc README
  119. %license LICENSE
  120. %{python3_sitearch}/PyQtWebEngine-%{version}.dist-info/
  121. %{python3_sitearch}/PyQt5/QtWebEngine.*
  122. %{python3_sitearch}/PyQt5/QtWebEngineCore.*
  123. %{python3_sitearch}/PyQt5/QtWebEngineWidgets.*
  124. %endif
  125. %files devel
  126. %license LICENSE
  127. %{_datadir}/sip/PyQt5/QtWebEngine*/
  128. %files doc
  129. # avoid dep on qscintilla-python, own %%_qt5_datadir/qsci/... here for now
  130. %dir %{_qt5_datadir}/qsci/
  131. %dir %{_qt5_datadir}/qsci/api/
  132. %dir %{_qt5_datadir}/qsci/api/python/
  133. %doc %{_qt5_datadir}/qsci/api/python/PyQtWebEngine.api
  134. %changelog
  135. * Tue Oct 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 5.12.1-1
  136. - initial build for Vine Linux.
  137. * Tue Oct 01 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.13.1-1
  138. - 5.13.1
  139. * Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.12.1-7
  140. - Rebuilt for Python 3.8
  141. * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.12.1-6
  142. - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
  143. * Mon Jul 08 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-5
  144. - fix/workaround -debug generation
  145. - +python2 support on f30
  146. * Thu Apr 11 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-4
  147. - -devel: %%license LICENSE
  148. * Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-3
  149. - %%doc README
  150. - %%license LICENSE
  151. - -devel: Requires: sip
  152. - use %%autosetup
  153. * Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-2
  154. - update Source0 URL
  155. - use ExclusiveArch
  156. - use %%build_cflags %%build_cxxflags %%build_ldflags
  157. - BR: gcc-c++
  158. * Sat Mar 23 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-1
  159. - first try