]>
Commit | Line | Data |
---|---|---|
861c1e6e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x support | |
4 | %bcond_without python3 # CPython 3.x support | |
5 | # | |
1e5508db JB |
6 | Summary: CPython bindings generator for C++ libraries |
7 | Summary(pl.UTF-8): Generator wiązań CPythona dla bibliotek C++ | |
8 | Name: shiboken | |
861c1e6e | 9 | Version: 1.2.2 |
8e58a7cc | 10 | Release: 9 |
1e5508db JB |
11 | License: LGPL v2.1+ (libraries), GPL v2 (tools) |
12 | Group: Development/Tools | |
13 | #Source0Download: http://qt-project.org/wiki/category:LanguageBindings::PySide::Downloads | |
861c1e6e JB |
14 | Source0: http://download.qt-project.org/official_releases/pyside/%{name}-%{version}.tar.bz2 |
15 | # Source0-md5: 9f5bee9d414ce51be07ff7a20054a48d | |
e19fa77b | 16 | Patch0: %{name}-python.patch |
47127cd5 | 17 | Patch1: build.patch |
1e5508db JB |
18 | URL: http://qt-project.org/PySide/ |
19 | BuildRequires: QtCore-devel >= 4.5.0 | |
20 | BuildRequires: QtXml-devel >= 4.5.0 | |
21 | BuildRequires: QtXmlPatterns-devel >= 4.5.0 | |
22 | BuildRequires: cmake >= 2.6 | |
23 | BuildRequires: libstdc++-devel | |
24 | BuildRequires: libxml2-devel >= 1:2.6.32 | |
25 | BuildRequires: libxslt-devel >= 1.1.19 | |
26 | BuildRequires: python-devel >= 1:2.6 | |
27 | BuildRequires: sphinx-pdg | |
28 | Requires: QtCore >= 4.5.0 | |
29 | Requires: QtXml >= 4.5.0 | |
30 | Requires: QtXmlPatterns >= 4.5.0 | |
31 | Requires: libxml2 >= 1:2.6.32 | |
32 | Requires: libxslt >= 1.1.19 | |
33 | Requires: python | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | shiboken is a CPython bindings generator for C++ libraries. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | shiboken to generator wiązań CPythona dla bibliotek C++. | |
41 | ||
861c1e6e JB |
42 | %package python2 |
43 | Summary: Shiboken Python 2.x support files | |
44 | Summary(pl.UTF-8): Shiboken - pliki do obsługi Pythona 2.x | |
45 | Group: Development/Libraries | |
46 | Requires: %{name} = %{version}-%{release} | |
47 | Requires: python-devel >= 1:%{py_ver} | |
48 | Requires: python-shiboken = %{version}-%{release} | |
49 | ||
50 | %description python2 | |
51 | Shiboken Python 2.x support files. | |
52 | ||
53 | %description python2 -l pl.UTF-8 | |
54 | Shiboken - pliki do obsługi Pythona 2.x. | |
55 | ||
56 | %package -n python-shiboken | |
57 | Summary: Shiboken runtime library for Python 2.x | |
58 | Summary(pl.UTF-8): Biblioteka uruchomieniowa shiboken dla Pythona 2.x | |
59 | Group: Libraries/Python | |
1e5508db | 60 | Requires: python-libs |
861c1e6e JB |
61 | Obsoletes: shiboken-libs |
62 | ||
63 | %description -n python-shiboken | |
64 | Shiboken runtime library for Python 2.x. | |
65 | ||
66 | %description -n python-shiboken -l pl.UTF-8 | |
67 | Biblioteka uruchomieniowa shiboken dla Pythona 2.x. | |
68 | ||
69 | %package python3 | |
70 | Summary: Shiboken Python 3.x support files | |
71 | Summary(pl.UTF-8): Shiboken - pliki do obsługi Pythona 3.x | |
72 | Group: Development/Libraries | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | Requires: python3-devel >= 1:%{py_ver} | |
75 | Requires: python3-shiboken = %{version}-%{release} | |
1e5508db | 76 | |
861c1e6e JB |
77 | %description python3 |
78 | Shiboken Python 3.x support files. | |
1e5508db | 79 | |
861c1e6e JB |
80 | %description python3 -l pl.UTF-8 |
81 | Shiboken - pliki do obsługi Pythona 3.x. | |
82 | ||
83 | %package -n python3-shiboken | |
84 | Summary: Shiboken runtime library for Python 3.x | |
85 | Summary(pl.UTF-8): Biblioteka uruchomieniowa shiboken dla Pythona 3.x | |
86 | Group: Libraries/Python | |
87 | Requires: python3-libs | |
88 | Obsoletes: shiboken-libs | |
89 | ||
90 | %description -n python3-shiboken | |
91 | Shiboken runtime library for Python 3.x. | |
92 | ||
93 | %description -n python3-shiboken -l pl.UTF-8 | |
94 | Biblioteka uruchomieniowa shiboken dla Pythona 3.x. | |
1e5508db JB |
95 | |
96 | %prep | |
97 | %setup -q | |
e19fa77b | 98 | %patch0 -p1 |
47127cd5 | 99 | %patch1 -p1 |
1e5508db JB |
100 | |
101 | %build | |
861c1e6e JB |
102 | %if %{with python2} |
103 | install -d build-py2 | |
104 | cd build-py2 | |
1e5508db | 105 | %cmake .. |
861c1e6e JB |
106 | %{__make} |
107 | cd .. | |
108 | %endif | |
1e5508db | 109 | |
861c1e6e JB |
110 | %if %{with python3} |
111 | install -d build-py3 | |
112 | cd build-py3 | |
113 | %cmake .. \ | |
114 | -DUSE_PYTHON3=TRUE | |
1e5508db | 115 | %{__make} |
861c1e6e JB |
116 | cd .. |
117 | %endif | |
1e5508db JB |
118 | |
119 | %install | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
861c1e6e JB |
122 | %if %{with python3} |
123 | %{__make} -C build-py3 install \ | |
124 | DESTDIR=$RPM_BUILD_ROOT | |
125 | # content depends on python version | |
126 | %{__mv} $RPM_BUILD_ROOT%{_pkgconfigdir}/shiboken{,3}.pc | |
127 | %endif | |
128 | ||
129 | %if %{with python2} | |
130 | %{__make} -C build-py2 install \ | |
1e5508db | 131 | DESTDIR=$RPM_BUILD_ROOT |
861c1e6e | 132 | %endif |
1e5508db JB |
133 | |
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
861c1e6e JB |
137 | %post -n python-shiboken -p /sbin/ldconfig |
138 | %postun -n python-shiboken -p /sbin/ldconfig | |
139 | ||
140 | %post -n python3-shiboken -p /sbin/ldconfig | |
141 | %postun -n python3-shiboken -p /sbin/ldconfig | |
377f5ae4 | 142 | |
1e5508db JB |
143 | %files |
144 | %defattr(644,root,root,755) | |
145 | %doc AUTHORS ChangeLog | |
146 | %attr(755,root,root) %{_bindir}/shiboken | |
1e5508db | 147 | %{_includedir}/shiboken |
861c1e6e JB |
148 | %dir %{_libdir}/cmake/Shiboken-%{version} |
149 | %{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig.cmake | |
150 | %{_libdir}/cmake/Shiboken-%{version}/ShibokenConfigVersion.cmake | |
1e5508db JB |
151 | %{_mandir}/man1/shiboken.1* |
152 | ||
861c1e6e JB |
153 | %if %{with python2} |
154 | %files python2 | |
155 | %defattr(644,root,root,755) | |
156 | %attr(755,root,root) %{_libdir}/libshiboken-python%{py_ver}.so | |
157 | %{_pkgconfigdir}/shiboken.pc | |
158 | %{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig-python%{py_ver}.cmake | |
159 | ||
160 | %files -n python-shiboken | |
1e5508db JB |
161 | %defattr(644,root,root,755) |
162 | %attr(755,root,root) %{_libdir}/libshiboken-python%{py_ver}.so.*.*.* | |
861c1e6e | 163 | %attr(755,root,root) %ghost %{_libdir}/libshiboken-python%{py_ver}.so.1.2 |
1e5508db | 164 | %attr(755,root,root) %{py_sitedir}/shiboken.so |
861c1e6e JB |
165 | %endif |
166 | ||
167 | %if %{with python3} | |
168 | %files python3 | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_libdir}/libshiboken.cpython-3*.so | |
171 | %{_pkgconfigdir}/shiboken3.pc | |
172 | %{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig.cpython-3*.cmake | |
173 | ||
174 | %files -n python3-shiboken | |
175 | %defattr(644,root,root,755) | |
176 | %attr(755,root,root) %{_libdir}/libshiboken.cpython-3*.so.*.*.* | |
177 | %attr(755,root,root) %ghost %{_libdir}/libshiboken.cpython-3*.so.1.2 | |
178 | %attr(755,root,root) %{py3_sitedir}/shiboken.so | |
179 | %endif |