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