Accepting request 590315 from home:dmulder:branches:network:samba:STABLE
Changes required for adding Python3 support to the samba package. Creates the samba-python3 package. OBS-URL: https://build.opensuse.org/request/show/590315 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=589
This commit is contained in:
parent
9ff2c68ccc
commit
9f4c71a284
39
samba.spec
39
samba.spec
@ -15,6 +15,11 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%if 0%{?sle_version} >= 150000
|
||||||
|
%define with_python3 1
|
||||||
|
%else
|
||||||
|
%define with_python3 0
|
||||||
|
%endif
|
||||||
|
|
||||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||||
%if ! %{defined _fillupdir}
|
%if ! %{defined _fillupdir}
|
||||||
@ -107,6 +112,10 @@ BuildRequires: popt-devel
|
|||||||
BuildRequires: pwdutils
|
BuildRequires: pwdutils
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-xml
|
BuildRequires: python-xml
|
||||||
|
%if %{with_python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-xml
|
||||||
|
%endif
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
%if 0%{?suse_version} >= 1330
|
%if 0%{?suse_version} >= 1330
|
||||||
BuildRequires: rpcgen
|
BuildRequires: rpcgen
|
||||||
@ -124,6 +133,12 @@ BuildRequires: python-ldb-devel
|
|||||||
BuildRequires: python-talloc-devel
|
BuildRequires: python-talloc-devel
|
||||||
BuildRequires: python-tdb
|
BuildRequires: python-tdb
|
||||||
BuildRequires: python-tevent
|
BuildRequires: python-tevent
|
||||||
|
%if %{with_python3}
|
||||||
|
BuildRequires: python3-ldb-devel
|
||||||
|
BuildRequires: python3-talloc-devel
|
||||||
|
BuildRequires: python3-tdb
|
||||||
|
BuildRequires: python3-tevent
|
||||||
|
%endif
|
||||||
# to generate the man pages
|
# to generate the man pages
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
@ -355,6 +370,21 @@ Requires: python-tevent
|
|||||||
The samba-python package contains the Python libraries needed by programs
|
The samba-python package contains the Python libraries needed by programs
|
||||||
that use SMB, RPC and other Samba provided protocols in Python programs.
|
that use SMB, RPC and other Samba provided protocols in Python programs.
|
||||||
|
|
||||||
|
%if %{with_python3}
|
||||||
|
%package python3
|
||||||
|
Summary: Samba Python3 libraries
|
||||||
|
License: GPL-3.0+
|
||||||
|
Group: Applications/System
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Requires: python3-ldb
|
||||||
|
Requires: python3-talloc
|
||||||
|
Requires: python3-tdb
|
||||||
|
Requires: python3-tevent
|
||||||
|
|
||||||
|
%description python3
|
||||||
|
The samba-python3 package contains the Python libraries needed by programs
|
||||||
|
that use SMB, RPC and other Samba provided protocols in Python3 programs.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
Summary: Testing tools for Samba servers and clients
|
Summary: Testing tools for Samba servers and clients
|
||||||
@ -1038,6 +1068,9 @@ CONFIGURE_OPTIONS="\
|
|||||||
--disable-python \
|
--disable-python \
|
||||||
%endif
|
%endif
|
||||||
--bundled-libraries=NONE,socket_wrapper,cmocka,${bundled_libraries_extra} \
|
--bundled-libraries=NONE,socket_wrapper,cmocka,${bundled_libraries_extra} \
|
||||||
|
%if %{with_python3}
|
||||||
|
--extra-python=/usr/bin/python3 \
|
||||||
|
%endif
|
||||||
"
|
"
|
||||||
./configure ${CONFIGURE_OPTIONS}
|
./configure ${CONFIGURE_OPTIONS}
|
||||||
make %{build_make_smp_mflags} \
|
make %{build_make_smp_mflags} \
|
||||||
@ -1955,6 +1988,12 @@ fi
|
|||||||
%exclude %{python_sitearch}/*
|
%exclude %{python_sitearch}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with_python3}
|
||||||
|
%files python3
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{python3_sitearch}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files test
|
%files test
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/gentest
|
%{_bindir}/gentest
|
||||||
|
Loading…
Reference in New Issue
Block a user