]>
Commit | Line | Data |
---|---|---|
cde8597a | 1 | %define module PyQt4 |
9197faa6 | 2 | # minimal required sip version |
838f959c | 3 | %define sip_ver 2:4.15 |
9197faa6 | 4 | # last qt version covered by these bindings (minimal required is currently 4.1.0) |
87096b1f | 5 | %define qt_ver 4.8.4 |
cde8597a KK |
6 | |
7 | Summary: Python bindings for the Qt4 toolkit | |
35f445d7 | 8 | Summary(pl.UTF-8): Dowiązania do toolkitu Qt4 dla Pythona |
cde8597a | 9 | Name: python-%{module} |
838f959c | 10 | Version: 4.10.3 |
31032967 | 11 | Release: 1 |
9197faa6 | 12 | License: GPL v2 or GPL v3 with FLOSS exception |
cde8597a | 13 | Group: Libraries/Python |
58daffa5 | 14 | Source0: http://downloads.sourceforge.net/pyqt/PyQt-x11-gpl-%{version}.tar.gz |
838f959c | 15 | # Source0-md5: 8b13d2ab64e4d2fd0037b81b7e78c15c |
7833726a | 16 | Patch0: %{name}-dbuspath.patch |
3d990fd2 | 17 | Patch1: %{name}-64bit.patch |
ff0b534d | 18 | URL: http://www.riverbankcomputing.com/software/pyqt/ |
233862fa | 19 | # most of BR comes from configure.py |
838f959c | 20 | BuildRequires: QtAssistant-compat-devel >= 4.6.3 |
9197faa6 | 21 | BuildRequires: QtCore-devel >= %{qt_ver} |
733b7fc7 | 22 | BuildRequires: QtDBus-devel >= %{qt_ver} |
9197faa6 JB |
23 | BuildRequires: QtDeclarative-devel >= %{qt_ver} |
24 | BuildRequires: QtDesigner-devel >= %{qt_ver} | |
25 | BuildRequires: QtGui-devel >= %{qt_ver} | |
26 | BuildRequires: QtHelp-devel >= %{qt_ver} | |
27 | BuildRequires: QtMultimedia-devel >= %{qt_ver} | |
28 | BuildRequires: QtNetwork-devel >= %{qt_ver} | |
29 | BuildRequires: QtOpenGL-devel >= %{qt_ver} | |
30 | BuildRequires: QtScript-devel >= %{qt_ver} | |
31 | BuildRequires: QtScriptTools-devel >= %{qt_ver} | |
32 | BuildRequires: QtSql-devel >= %{qt_ver} | |
33 | BuildRequires: QtSvg-devel >= %{qt_ver} | |
34 | BuildRequires: QtTest-devel >= %{qt_ver} | |
35 | BuildRequires: QtWebKit-devel >= %{qt_ver} | |
36 | BuildRequires: QtXml-devel >= %{qt_ver} | |
37 | BuildRequires: QtXmlPatterns-devel >= %{qt_ver} | |
233862fa | 38 | BuildRequires: phonon-devel |
36d3212d | 39 | BuildRequires: pkgconfig |
3c1063ca | 40 | BuildRequires: python-dbus-devel >= 0.80 |
9197faa6 | 41 | BuildRequires: python-sip-devel >= %{sip_ver} |
7943e9de JB |
42 | BuildRequires: qt4-build >= 4.3.3-3 |
43 | BuildRequires: qt4-qmake >= 4.3.3-3 | |
cde8597a KK |
44 | BuildRequires: rpm-pythonprov |
45 | BuildRequires: rpmbuild(macros) >= 1.219 | |
7a2a342d | 46 | BuildRequires: sed >= 4.0 |
cde8597a | 47 | %pyrequires_eq python-libs |
9197faa6 JB |
48 | Requires: python-dbus >= 0.80 |
49 | Requires: python-sip >= %{sip_ver} | |
cde8597a KK |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %define _noautoreqdep libGL.so.1 libGLU.so.1 | |
53 | %define _sipfilesdir %{_datadir}/sip | |
54 | ||
55 | %description | |
56 | PyQt4 is a set of Python bindings for the Qt4 toolkit. The bindings | |
9197faa6 JB |
57 | are implemented as a set of Python modules: QtCore, QtDeclarative, |
58 | QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL, | |
59 | QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml, | |
60 | QtXmlPatterns and phonon. | |
36d3212d | 61 | |
7b7e25a5 JR |
62 | %description -l pl.UTF-8 |
63 | PyQt4 to zbiór dowiązań do Qt4 dla Pythona. Dowiązania zostały | |
9197faa6 JB |
64 | zaimplementowane jako moduły Pythona: QtCore, QtDeclarative, |
65 | QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL, | |
66 | QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml, | |
67 | QtXmlPatterns oraz phonon. | |
cde8597a KK |
68 | |
69 | %package devel | |
70 | Summary: Files needed to build other bindings based on Qt4 | |
9197faa6 | 71 | Summary(pl.UTF-8): Pliki potrzebne do budowania innych dowiązań opartych na Qt4 |
cde8597a KK |
72 | Group: Development/Languages/Python |
73 | Requires: %{name} = %{version}-%{release} | |
74 | Requires: python-sip-devel | |
75 | ||
76 | %description devel | |
77 | Files needed to build other bindings for C++ classes that inherit from | |
78 | any of the Qt4 classes (e.g. KDE or your own). | |
79 | ||
7b7e25a5 JR |
80 | %description devel -l pl.UTF-8 |
81 | Pliki potrzebne do budowania innych dowiązań do klas C++ | |
82 | dziedziczących z dowolnej klasy Qt4 (np. KDE lub własnych). | |
cde8597a | 83 | |
9197faa6 JB |
84 | %package devel-tools |
85 | Summary: PyQt4 development tools | |
86 | Summary(pl.UTF-8): Narzędzia programistyczne PyQt4 | |
87 | Group: X11/Development/Libraries | |
88 | Requires: %{name} = %{version}-%{release} | |
89 | ||
90 | %description devel-tools | |
91 | PyQt4 development tools: pylupdate4, pyrcc4, pyuic4. | |
92 | ||
93 | %description devel-tools -l pl.UTF-8 | |
94 | Narzędzia programistyczne PyQt4: pylupdate4, pyrcc4, pyuic4. | |
95 | ||
cde8597a KK |
96 | %package examples |
97 | Summary: Examples for PyQt4 | |
35f445d7 | 98 | Summary(pl.UTF-8): Przykłady do PyQt4 |
cde8597a KK |
99 | Group: Libraries/Python |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
102 | %description examples | |
103 | Examples code demonstrating how to use the Python bindings for Qt4. | |
104 | ||
7b7e25a5 JR |
105 | %description examples -l pl.UTF-8 |
106 | Przykładowy kod demonstrujący jak używać PyQt4. | |
cde8597a | 107 | |
36d3212d KK |
108 | %package -n qscintilla2-%{module}-api |
109 | Summary: PyQt4 API file for QScintilla | |
0110a319 | 110 | Summary(pl.UTF-8): Plik API PyQt4 dla QScintilli |
36d3212d KK |
111 | Group: Libraries/Python |
112 | Requires: python-qscintilla2 >= 2.2-2 | |
113 | ||
114 | %description -n qscintilla2-%{module}-api | |
115 | PyQt4 API file can be used by the QScintilla editor component to | |
116 | enable the use of auto-completion and call tips when editing PyQt4 | |
117 | code. | |
118 | ||
0110a319 JB |
119 | %description -n qscintilla2-%{module}-api -l pl.UTF-8 |
120 | Plik API PyQt4 może być używany przez komponent edytora QScintilla aby | |
121 | umożliwić automatyczne dopełnianie i podpowiedzi przy modyfikowaniu | |
122 | kodu wykorzystującego PyQt4. | |
123 | ||
cde8597a | 124 | %prep |
268b959a | 125 | %setup -q -n PyQt-x11-gpl-%{version} |
7a2a342d | 126 | %{__sed} -i 's,pyuic.py,pyuic.pyc,' configure.py |
f83ff0a7 | 127 | # small hack to build for shared libs - symbol QT_SHARED not defined anymore? |
68bdfd61 | 128 | %{__sed} -i 's/qt_shared = lines\[.*\]/qt_shared = "y"/' configure.py |
0d988e33 | 129 | %{__sed} -i 's/resp = sys.stdin.readline.*/resp = "yes"/' configure.py |
7833726a | 130 | %patch0 -p1 |
3d990fd2 | 131 | %patch1 -p1 |
cde8597a KK |
132 | |
133 | %build | |
9197faa6 | 134 | %{__python} configure.py \ |
233862fa | 135 | --confirm-license \ |
cde8597a | 136 | -c -j 3 \ |
36d3212d | 137 | -a \ |
cde8597a | 138 | -b %{_bindir} \ |
8b198666 | 139 | -d %{py_sitedir} \ |
7943e9de | 140 | -q "%{_bindir}/qmake-qt4" \ |
268b959a | 141 | -v %{_sipfilesdir}/%{module} \ |
7833726a | 142 | --dbus-path="%{py_sitedir}/dbus/mainloop" \ |
abbf3bae | 143 | LIBDIR_QT="%{_libdir}" \ |
144 | CC="%{__cc}" \ | |
145 | CXX="%{__cxx}" | |
cde8597a KK |
146 | |
147 | %{__make} | |
148 | ||
149 | %install | |
150 | rm -rf $RPM_BUILD_ROOT | |
c694bf53 | 151 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
cde8597a KK |
152 | |
153 | %{__make} install \ | |
0110a319 JB |
154 | DESTDIR=$RPM_BUILD_ROOT \ |
155 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
cde8597a KK |
156 | |
157 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
158 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
4d0bf668 AF |
159 | |
160 | # don't use py_postclean, leave *.py in %{py_sitedir}/PyQt4/uic/widget-plugins | |
9197faa6 JB |
161 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/*.py |
162 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/*.py | |
163 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Compiler/*.py | |
164 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Loader/*.py | |
165 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v2/*.py | |
166 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v3/*.py | |
cde8597a | 167 | |
c694bf53 | 168 | cp -R examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
cde8597a KK |
169 | |
170 | %clean | |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
173 | %files | |
174 | %defattr(644,root,root,755) | |
9197faa6 | 175 | %doc GPL_EXCEPTION.TXT NEWS OPENSOURCE-NOTICE.TXT README THANKS |
838f959c | 176 | %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libpyqt4.so |
c694bf53 | 177 | %dir %{py_sitedir}/PyQt4 |
9197faa6 | 178 | %attr(755,root,root) %{py_sitedir}/PyQt4/Qt.so |
838f959c | 179 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtAssistant.so |
9197faa6 | 180 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtCore.so |
733b7fc7 | 181 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtDBus.so |
9197faa6 JB |
182 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtDeclarative.so |
183 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtDesigner.so | |
184 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtGui.so | |
185 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtHelp.so | |
186 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtMultimedia.so | |
187 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtNetwork.so | |
188 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtOpenGL.so | |
189 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtScript.so | |
190 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtScriptTools.so | |
191 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtSql.so | |
192 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtSvg.so | |
193 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtTest.so | |
194 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtWebKit.so | |
195 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtXml.so | |
196 | %attr(755,root,root) %{py_sitedir}/PyQt4/QtXmlPatterns.so | |
197 | %attr(755,root,root) %{py_sitedir}/PyQt4/phonon.so | |
198 | %{py_sitedir}/PyQt4/__init__.py[co] | |
199 | %{py_sitedir}/PyQt4/pyqtconfig.py[co] | |
0110a319 | 200 | %attr(755,root,root) %{py_sitedir}/dbus/mainloop/qt.so |
cde8597a KK |
201 | |
202 | %files devel | |
203 | %defattr(644,root,root,755) | |
204 | %{_sipfilesdir}/PyQt4 | |
205 | ||
9197faa6 JB |
206 | %files devel-tools |
207 | %defattr(644,root,root,755) | |
208 | %attr(755,root,root) %{_bindir}/pylupdate4 | |
209 | %attr(755,root,root) %{_bindir}/pyrcc4 | |
210 | %attr(755,root,root) %{_bindir}/pyuic4 | |
211 | %{py_sitedir}/PyQt4/uic | |
212 | ||
cde8597a KK |
213 | %files examples |
214 | %defattr(644,root,root,755) | |
c694bf53 | 215 | %{_examplesdir}/%{name}-%{version} |
36d3212d KK |
216 | |
217 | %files -n qscintilla2-%{module}-api | |
218 | %defattr(644,root,root,755) | |
219 | %{_datadir}/qt4/qsci/api/python/PyQt4.api |