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