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