]> git.pld-linux.org Git - packages/python-PySide.git/blob - python-PySide.spec
- build also python3-* packages; common part of -devel in -common-devel, .pc files...
[packages/python-PySide.git] / python-PySide.spec
1 %define         qt_ver          4.8
2 %define         pyside_ver      1.2.4
3 #
4 # Conditional build:
5 %bcond_with     apidocs         # build API documentation (needs Qt sources)
6 %bcond_without  python2         # CPython 2.x module
7 %bcond_without  python3         # CPython 3.x module
8 #
9 Summary:        PySide - Python bindings for the Qt 4 toolkit
10 Summary(pl.UTF-8):      PySide - wiązania Pythona do toolkitu Qt 4
11 Name:           python-PySide
12 Version:        %{qt_ver}_%{pyside_ver}
13 Release:        1
14 License:        LGPL v2.1+
15 Group:          Libraries/Python
16 #Source0Download: https://github.com/pyside/PySide/releases
17 Source0:        https://github.com/pyside/PySide/archive/%{pyside_ver}/PySide-%{pyside_ver}.tar.gz
18 # Source0-md5:  c28563e1f3c3ce269a7cc634f97d271c
19 URL:            https://github.com/pyside/PySide/
20 BuildRequires:  OpenGL-devel
21 BuildRequires:  QtCore-devel >= %{qt_ver}
22 BuildRequires:  QtDeclarative-devel >= %{qt_ver}
23 BuildRequires:  QtGui-devel >= %{qt_ver}
24 BuildRequires:  QtHelp-devel >= %{qt_ver}
25 BuildRequires:  QtMultimedia-devel >= %{qt_ver}
26 BuildRequires:  QtNetwork-devel >= %{qt_ver}
27 BuildRequires:  QtOpenGL-devel >= %{qt_ver}
28 BuildRequires:  QtScript-devel >= %{qt_ver}
29 BuildRequires:  QtScriptTools-devel >= %{qt_ver}
30 BuildRequires:  QtSql-devel >= %{qt_ver}
31 BuildRequires:  QtSvg-devel >= %{qt_ver}
32 BuildRequires:  QtTest-devel >= %{qt_ver}
33 BuildRequires:  QtUiTools-devel >= %{qt_ver}
34 BuildRequires:  QtWebKit-devel >= %{qt_ver}
35 BuildRequires:  QtXml-devel >= %{qt_ver}
36 BuildRequires:  QtXmlPatterns-devel >= %{qt_ver}
37 BuildRequires:  cmake >= 2.6
38 BuildRequires:  phonon-devel
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  rpmbuild(macros) >= 1.605
41 %{?with_python2:BuildRequires:  shiboken-python2 >= %{pyside_ver}}
42 %{?with_python3:BuildRequires:  shiboken-python3 >= %{pyside_ver}}
43 %if %{with apidocs}
44 BuildRequires:  graphviz
45 BuildRequires:  qt4-build
46 BuildRequires:  qt4-source
47 BuildRequires:  sphinx-pdg
48 %endif
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         py3_soabi       %(%{__python3} -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"));')
52
53 %description
54 PySide project provides LGPL-licensed Python bindings for the Qt. It
55 also includes complete toolchain for rapidly generating bindings for
56 any Qt-based C++ class hierarchies. PySide Qt bindings allow both free
57 open source and proprietary software development and ultimately aim to
58 support Qt platforms.
59
60 This package contains Python 2 bindings.
61
62 %description -l pl.UTF-8
63 Projekt PySide udostępnia na licencji LGPL wiązania Pythona dla
64 tookitu Qt. Zawiera także pełny zestaw narzędzi do szybkiego
65 generowania wiązań dla dowolnej hierarchii klas C++ opartych na Qt.
66 Wiązania Qt PySide pozwalają na tworzenie zarówno wolnodostępnego, jak
67 i własnościowego oprogramowania i mają na celu wsparcie platform Qt.
68
69 Ten pakiet zawiera wiązania Pythona 2.
70
71 %package devel
72 Summary:        Development files for PySide bindings
73 Summary(pl.UTF-8):      Pliki programistyczne dla wiązań PySide
74 Group:          Development/Libraries
75 Requires:       %{name} = %{version}-%{release}
76 Requires:       %{name}-common-devel = %{version}-%{release}
77 Requires:       shiboken-python2 >= %{pyside_ver}
78
79 %description devel
80 Development files for PySide bindings for Python 2.
81
82 %description devel -l pl.UTF-8
83 Pliki programistyczne dla wiązań PySide dla Pythona 2.
84
85 %package common-devel
86 Summary:        Common development files for PySide bindings
87 Summary(pl.UTF-8):      Wspólne pliki programistyczne dla wiązań PySide
88 Group:          Development/Libraries
89 Conflicts:      python-PySide-devel < 4.8_1.2.4-1
90
91 %description common-devel
92 Development files for PySide bindings, common for Python 2 and 3.
93
94 %description common-devel -l pl.UTF-8
95 Pliki programistyczne dla wiązań PySide, wspólne dla Pythona 2 i 3.
96
97 %package -n python3-PySide
98 Summary:        PySide - Python bindings for the Qt 4 toolkit
99 Summary(pl.UTF-8):      PySide - wiązania Pythona do toolkitu Qt 4
100 Group:          Libraries/Python
101
102 %description -n python3-PySide
103 PySide project provides LGPL-licensed Python bindings for the Qt. It
104 also includes complete toolchain for rapidly generating bindings for
105 any Qt-based C++ class hierarchies. PySide Qt bindings allow both free
106 open source and proprietary software development and ultimately aim to
107 support Qt platforms.
108
109 This package contains Python 3 bindings.
110
111 %description -n python3-PySide -l pl.UTF-8
112 Projekt PySide udostępnia na licencji LGPL wiązania Pythona dla
113 tookitu Qt. Zawiera także pełny zestaw narzędzi do szybkiego
114 generowania wiązań dla dowolnej hierarchii klas C++ opartych na Qt.
115 Wiązania Qt PySide pozwalają na tworzenie zarówno wolnodostępnego, jak
116 i własnościowego oprogramowania i mają na celu wsparcie platform Qt.
117
118 Ten pakiet zawiera wiązania Pythona 3.
119
120 %package -n python3-PySide-devel
121 Summary:        Development files for PySide bindings
122 Summary(pl.UTF-8):      Pliki programistyczne dla wiązań PySide
123 Group:          Development/Libraries
124 Requires:       %{name}-common-devel = %{version}-%{release}
125 Requires:       python3-PySide = %{version}-%{release}
126 Requires:       shiboken-python3 >= %{pyside_ver}
127
128 %description -n python3-PySide-devel
129 Development files for PySide bindings for Python 3.
130
131 %description -n python3-PySide-devel -l pl.UTF-8
132 Pliki programistyczne dla wiązań PySide dla Pythona 3.
133
134 %prep
135 %setup -q -n PySide-%{pyside_ver}
136
137 %build
138 %if %{with python2}
139 install -d build
140 cd build
141 %cmake ..
142
143 %{__make}
144 cd ..
145 %endif
146
147 %if %{with python3}
148 install -d build-py3
149 cd build-py3
150 %cmake .. \
151         -DPYTHON_SUFFIX=.%{py3_soabi}
152 %endif
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156
157 %if %{with python2}
158 %{__make} -C build install \
159         DESTDIR=$RPM_BUILD_ROOT
160
161 %{__mv} $RPM_BUILD_ROOT%{_pkgconfigdir}/{pyside,pyside-py%{py_ver}}.pc
162
163 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/PySide
164 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/PySide
165 %py_postclean
166 %endif
167
168 %if %{with python3}
169 %{__make} -C build-py3 install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 %{__mv} $RPM_BUILD_ROOT%{_pkgconfigdir}/{pyside,pyside-py%{py3_ver}}.pc
173
174 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/PySide
175 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/PySide
176 %endif
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %post   -p /sbin/ldconfig
182 %postun -p /sbin/ldconfig
183
184 %if %{with python2}
185 %files
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/libpyside-python%{py_ver}.so.*.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libpyside-python%{py_ver}.so.1.2
189 %dir %{py_sitedir}/PySide
190 %attr(755,root,root) %{py_sitedir}/PySide/QtCore.so
191 %attr(755,root,root) %{py_sitedir}/PySide/QtDeclarative.so
192 %attr(755,root,root) %{py_sitedir}/PySide/QtGui.so
193 %attr(755,root,root) %{py_sitedir}/PySide/QtHelp.so
194 %attr(755,root,root) %{py_sitedir}/PySide/QtMultimedia.so
195 %attr(755,root,root) %{py_sitedir}/PySide/QtNetwork.so
196 %attr(755,root,root) %{py_sitedir}/PySide/QtOpenGL.so
197 %attr(755,root,root) %{py_sitedir}/PySide/QtScript.so
198 %attr(755,root,root) %{py_sitedir}/PySide/QtScriptTools.so
199 %attr(755,root,root) %{py_sitedir}/PySide/QtSql.so
200 %attr(755,root,root) %{py_sitedir}/PySide/QtSvg.so
201 %attr(755,root,root) %{py_sitedir}/PySide/QtTest.so
202 %attr(755,root,root) %{py_sitedir}/PySide/QtUiTools.so
203 %attr(755,root,root) %{py_sitedir}/PySide/QtWebKit.so
204 %attr(755,root,root) %{py_sitedir}/PySide/QtXml.so
205 %attr(755,root,root) %{py_sitedir}/PySide/QtXmlPatterns.so
206 %attr(755,root,root) %{py_sitedir}/PySide/phonon.so
207 %{py_sitedir}/PySide/__init__.py[co]
208 %{py_sitedir}/PySide/_utils.py[co]
209
210 %files devel
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libpyside-python%{py_ver}.so
213 %{_pkgconfigdir}/pyside-py%{py_ver}.pc
214 %{_libdir}/cmake/PySide-%{pyside_ver}/PySideConfig-python%{py_ver}.cmake
215 %endif
216
217 %files common-devel
218 %defattr(644,root,root,755)
219 %{_includedir}/PySide
220 %dir %{_datadir}/PySide
221 %{_datadir}/PySide/typesystems
222 %dir %{_libdir}/cmake/PySide-%{pyside_ver}
223 %{_libdir}/cmake/PySide-%{pyside_ver}/PySideConfig.cmake
224 %{_libdir}/cmake/PySide-%{pyside_ver}/PySideConfigVersion.cmake
225
226 %if %{with python3}
227 %files -n python3-PySide
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libpyside.%{py3_soabi}.so.*.*.*
230 %attr(755,root,root) %ghost %{_libdir}/libpyside.%{py3_soabi}.so.1.2
231 %dir %{py3_sitedir}/PySide
232 %attr(755,root,root) %{py3_sitedir}/PySide/QtCore.so
233 %attr(755,root,root) %{py3_sitedir}/PySide/QtDeclarative.so
234 %attr(755,root,root) %{py3_sitedir}/PySide/QtGui.so
235 %attr(755,root,root) %{py3_sitedir}/PySide/QtHelp.so
236 %attr(755,root,root) %{py3_sitedir}/PySide/QtMultimedia.so
237 %attr(755,root,root) %{py3_sitedir}/PySide/QtNetwork.so
238 %attr(755,root,root) %{py3_sitedir}/PySide/QtOpenGL.so
239 %attr(755,root,root) %{py3_sitedir}/PySide/QtScript.so
240 %attr(755,root,root) %{py3_sitedir}/PySide/QtScriptTools.so
241 %attr(755,root,root) %{py3_sitedir}/PySide/QtSql.so
242 %attr(755,root,root) %{py3_sitedir}/PySide/QtSvg.so
243 %attr(755,root,root) %{py3_sitedir}/PySide/QtTest.so
244 %attr(755,root,root) %{py3_sitedir}/PySide/QtUiTools.so
245 %attr(755,root,root) %{py3_sitedir}/PySide/QtWebKit.so
246 %attr(755,root,root) %{py3_sitedir}/PySide/QtXml.so
247 %attr(755,root,root) %{py3_sitedir}/PySide/QtXmlPatterns.so
248 %attr(755,root,root) %{py3_sitedir}/PySide/phonon.so
249 %{py3_sitedir}/PySide/__init__.py
250 %{py3_sitedir}/PySide/_utils.py
251 %{py3_sitedir}/PySide/__pycache__
252
253 %files -n python3-PySide-devel
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/libpyside.%{py3_soabi}.so
256 %{_pkgconfigdir}/pyside-py%{py3_ver}.pc
257 %{_libdir}/cmake/PySide-%{pyside_ver}/PySideConfig.%{py3_soabi}.cmake
258 %endif
This page took 0.065133 seconds and 3 git commands to generate.