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