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