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