SHA256
1
0
forked from pool/ldb

Accepting request 566447 from home:dmulder:branches:network:samba:STABLE

Changes required for adding Python3 support to the samba package (also fixes conditions for sle 11sp4 build, as pointed out by scabrero)

OBS-URL: https://build.opensuse.org/request/show/566447
OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/ldb?expand=0&rev=119
This commit is contained in:
Aurelien Aptel 2018-03-19 15:26:04 +00:00 committed by Git OBS Bridge
parent a46946662c
commit 69a5502c46

View File

@ -18,6 +18,7 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?py3_soflags: %global py3_soflags cpython-%{python3_version_nodots}m}
%{!?py3_soflags_dash: %global py3_soflags_dash %(echo %{py3_soflags} | sed "s/_/-/g")}
%if 0%{?suse_version} > 1310 || 0%{?fedora_version} > 20
%define with_python3 1
%else
@ -48,9 +49,8 @@ BuildRequires: python-tevent >= %{tevent_version}
BuildRequires: python3-devel
BuildRequires: python3-talloc >= %{talloc_version}
BuildRequires: python3-talloc-devel >= %{talloc_version}
%else
BuildRequires: python-talloc-devel >= %{talloc_version}
%endif
BuildRequires: python-talloc-devel >= %{talloc_version}
Url: https://ldb.samba.org/
Version: 1.3.2
Release: 0
@ -116,7 +116,6 @@ Requires: pkg-config
Requires: python-ldb = %{version}
Provides: pyldb-devel = %{version}
Obsoletes: pyldb-devel < %{version}
Conflicts: python3-ldb-devel
%description -n python-ldb-devel
This package contains the development files for the Python bindings for the
@ -135,7 +134,6 @@ Summary: Development files for the Python3 bindings for the LDB library
Group: Development/Libraries/Python
Requires: pkg-config
Requires: python3-ldb = %{version}
Conflicts: python-ldb-devel
%description -n python3-ldb-devel
This package contains the development files for the Python bindings for the
@ -191,6 +189,10 @@ make test
# Install API documentation
cp -a apidocs/man/* %{buildroot}/%{_mandir}
%if %{with_python3}
sed -i 's;-lpyldb-util.%{py3_soflags_dash};-lpyldb-util.%{py3_soflags};g' %{buildroot}/%{_libdir}/pkgconfig/pyldb-util.%{py3_soflags}.pc
%endif
%post -n libldb1 -p /sbin/ldconfig
%postun -n libldb1 -p /sbin/ldconfig
@ -233,7 +235,7 @@ cp -a apidocs/man/* %{buildroot}/%{_mandir}
%dir %{_libdir}/ldb
%{_libdir}/pkgconfig/ldb.pc
%{_mandir}/man3/ldb*.3.*
%if 0%{?suse_version} != 1110
%if 0%{?suse_version} != 1110 || %{_arch} != i386
%{_mandir}/man3/ldif*.3.*
%endif
@ -264,7 +266,7 @@ cp -a apidocs/man/* %{buildroot}/%{_mandir}
%{_includedir}/pyldb.h
%{_libdir}/libpyldb-util.so
%{_libdir}/pkgconfig/pyldb-util.pc
%if 0%{?suse_version} != 1110
%if 0%{?suse_version} != 1110 || %{_arch} != i386
%{_mandir}/man3/PyLdb*.3.*
%endif