From cc9925683de81d7c8eccc6a05fc7f66a3bd38f37fae64c245b72bb76ac17cfb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= Date: Sun, 25 Oct 2015 14:23:52 +0000 Subject: [PATCH] Accepting request 340831 from home:lmuelle:pyton3-samba Add python3-talloc and python3-talloc-devel; (bsc#951911). OBS-URL: https://build.opensuse.org/request/show/340831 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/talloc?expand=0&rev=55 --- talloc.changes | 5 +++++ talloc.spec | 60 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/talloc.changes b/talloc.changes index fc556fb..8dde271 100644 --- a/talloc.changes +++ b/talloc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 24 21:19:20 UTC 2015 - lmuelle@suse.com + +- Add python3-talloc and python3-talloc-devel; (bsc#951911). + ------------------------------------------------------------------- Thu Oct 22 20:41:47 UTC 2015 - lmuelle@suse.com diff --git a/talloc.spec b/talloc.spec index af6e690..377e918 100644 --- a/talloc.spec +++ b/talloc.spec @@ -17,6 +17,12 @@ %{!?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} +%if 0%{?suse_version} > 1310 || 0%{?%fedora_version} > 19 +%define with_python3 1 +%else +%define with_python3 0 +%endif Name: talloc %if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140 @@ -33,6 +39,9 @@ BuildRequires: pkg-config BuildRequires: pkgconfig %endif BuildRequires: python-devel +%if %{with_python3} +BuildRequires: python3-devel +%endif %if 0%{?suse_version} > 1100 #!BuildIgnore: python %endif @@ -113,11 +122,38 @@ Requires: pkgconfig %endif Provides: pytalloc-devel = %{version} Obsoletes: pytalloc-devel < %{version} +Conflicts: python3-talloc-devel %description -n python-talloc-devel -Libraries and Header Files to Develop Programs with pytalloc Support +Libraries and Header Files to Develop Programs with python-talloc Support +%if %{with_python3} +%package -n python3-talloc +Summary: Python bindings for the Talloc library +Group: Development/Libraries/Python +Requires: %{libtalloc_name} = %{version} +PreReq: /sbin/ldconfig + +%description -n python3-talloc +This package contains the python3 bindings for the Talloc library. + + +%package -n python3-talloc-devel +Summary: Developer tools for the Talloc library +Group: Development/Libraries/Python +Requires: python3-talloc = %{version} +%if 0%{?suse_version} > 1020 +Requires: pkg-config +%else +Requires: pkgconfig +%endif +Conflicts: python-talloc-devel + +%description -n python3-talloc-devel +Libraries and Header Files to Develop Programs with python3-talloc Support +%endif + %prep %setup -n talloc-%{version} -q @@ -135,6 +171,9 @@ CONFIGURE_OPTIONS="\ --disable-rpath \ --bundled-libraries=NONE \ --builtin-libraries=replace \ +%if %{with_python3} + --extra-python=/usr/bin/python3 \ +%endif " ./configure ${CONFIGURE_OPTIONS} %{__make} %{build_make_smp_mflags} \ @@ -155,6 +194,12 @@ DESTDIR=${RPM_BUILD_ROOT} make install %postun -n python-talloc -p /sbin/ldconfig +%if %{with_python3} +%post -n python3-talloc -p /sbin/ldconfig + +%postun -n python3-talloc -p /sbin/ldconfig +%endif + %files -n %{libtalloc_name} %defattr(-,root,root) %{_libdir}/libtalloc.so.* @@ -179,4 +224,17 @@ DESTDIR=${RPM_BUILD_ROOT} make install %{_libdir}/pkgconfig/pytalloc-util.pc %{_libdir}/libpytalloc-util.so +%if %{with_python3} +%files -n python3-talloc +%defattr(-,root,root,-) +%{_libdir}/libpytalloc-util.%{py3_soflags}.so.* +%{python3_sitearch}/talloc.%{py3_soflags}.so + +%files -n python3-talloc-devel +%defattr(-,root,root,-) +%{_includedir}/pytalloc.h +%{_libdir}/pkgconfig/pytalloc-util.pc +%{_libdir}/libpytalloc-util.%{py3_soflags}.so +%endif + %changelog