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