]> git.pld-linux.org Git - packages/shiboken.git/blame - shiboken.spec
- rebuild with python 3.8
[packages/shiboken.git] / shiboken.spec
CommitLineData
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
6Summary: CPython bindings generator for C++ libraries
7Summary(pl.UTF-8): Generator wiązań CPythona dla bibliotek C++
8Name: shiboken
861c1e6e 9Version: 1.2.2
8e58a7cc 10Release: 9
1e5508db
JB
11License: LGPL v2.1+ (libraries), GPL v2 (tools)
12Group: Development/Tools
13#Source0Download: http://qt-project.org/wiki/category:LanguageBindings::PySide::Downloads
861c1e6e
JB
14Source0: http://download.qt-project.org/official_releases/pyside/%{name}-%{version}.tar.bz2
15# Source0-md5: 9f5bee9d414ce51be07ff7a20054a48d
e19fa77b 16Patch0: %{name}-python.patch
47127cd5 17Patch1: build.patch
1e5508db
JB
18URL: http://qt-project.org/PySide/
19BuildRequires: QtCore-devel >= 4.5.0
20BuildRequires: QtXml-devel >= 4.5.0
21BuildRequires: QtXmlPatterns-devel >= 4.5.0
22BuildRequires: cmake >= 2.6
23BuildRequires: libstdc++-devel
24BuildRequires: libxml2-devel >= 1:2.6.32
25BuildRequires: libxslt-devel >= 1.1.19
26BuildRequires: python-devel >= 1:2.6
27BuildRequires: sphinx-pdg
28Requires: QtCore >= 4.5.0
29Requires: QtXml >= 4.5.0
30Requires: QtXmlPatterns >= 4.5.0
31Requires: libxml2 >= 1:2.6.32
32Requires: libxslt >= 1.1.19
33Requires: python
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37shiboken is a CPython bindings generator for C++ libraries.
38
39%description -l pl.UTF-8
40shiboken to generator wiązań CPythona dla bibliotek C++.
41
861c1e6e
JB
42%package python2
43Summary: Shiboken Python 2.x support files
44Summary(pl.UTF-8): Shiboken - pliki do obsługi Pythona 2.x
45Group: Development/Libraries
46Requires: %{name} = %{version}-%{release}
47Requires: python-devel >= 1:%{py_ver}
48Requires: python-shiboken = %{version}-%{release}
49
50%description python2
51Shiboken Python 2.x support files.
52
53%description python2 -l pl.UTF-8
54Shiboken - pliki do obsługi Pythona 2.x.
55
56%package -n python-shiboken
57Summary: Shiboken runtime library for Python 2.x
58Summary(pl.UTF-8): Biblioteka uruchomieniowa shiboken dla Pythona 2.x
59Group: Libraries/Python
1e5508db 60Requires: python-libs
861c1e6e
JB
61Obsoletes: shiboken-libs
62
63%description -n python-shiboken
64Shiboken runtime library for Python 2.x.
65
66%description -n python-shiboken -l pl.UTF-8
67Biblioteka uruchomieniowa shiboken dla Pythona 2.x.
68
69%package python3
70Summary: Shiboken Python 3.x support files
71Summary(pl.UTF-8): Shiboken - pliki do obsługi Pythona 3.x
72Group: Development/Libraries
73Requires: %{name} = %{version}-%{release}
74Requires: python3-devel >= 1:%{py_ver}
75Requires: python3-shiboken = %{version}-%{release}
1e5508db 76
861c1e6e
JB
77%description python3
78Shiboken Python 3.x support files.
1e5508db 79
861c1e6e
JB
80%description python3 -l pl.UTF-8
81Shiboken - pliki do obsługi Pythona 3.x.
82
83%package -n python3-shiboken
84Summary: Shiboken runtime library for Python 3.x
85Summary(pl.UTF-8): Biblioteka uruchomieniowa shiboken dla Pythona 3.x
86Group: Libraries/Python
87Requires: python3-libs
88Obsoletes: shiboken-libs
89
90%description -n python3-shiboken
91Shiboken runtime library for Python 3.x.
92
93%description -n python3-shiboken -l pl.UTF-8
94Biblioteka 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}
103install -d build-py2
104cd build-py2
1e5508db 105%cmake ..
861c1e6e
JB
106%{__make}
107cd ..
108%endif
1e5508db 109
861c1e6e
JB
110%if %{with python3}
111install -d build-py3
112cd build-py3
113%cmake .. \
114 -DUSE_PYTHON3=TRUE
1e5508db 115%{__make}
861c1e6e
JB
116cd ..
117%endif
1e5508db
JB
118
119%install
120rm -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
135rm -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
This page took 0.18898 seconds and 4 git commands to generate.