diff --git a/libcap-ng-python.changes b/libcap-ng-python.changes index 3c8ed56..3881aa2 100644 --- a/libcap-ng-python.changes +++ b/libcap-ng-python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 20 10:28:46 UTC 2018 - tchvatal@suse.com + +- Switch to singlespec approach to allow building of python3 + bindings + ------------------------------------------------------------------- Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de diff --git a/libcap-ng-python.spec b/libcap-ng-python.spec index af11b08..7453367 100644 --- a/libcap-ng-python.spec +++ b/libcap-ng-python.spec @@ -17,6 +17,8 @@ %define sover 0 +%bcond_without python2 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: libcap-ng-python Version: 0.7.9 Release: 0 @@ -27,43 +29,62 @@ Url: https://people.redhat.com/sgrubb/libcap-ng Source0: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source1: baselibs.conf Source99: libcap-ng.rpmlintrc +BuildRequires: %{python_module devel} BuildRequires: kernel-headers >= 2.6.11 +BuildRequires: libcap-ng-devel = %{version} BuildRequires: pkgconfig -BuildRequires: python-base +BuildRequires: python-rpm-macros +BuildRequires: swig %description libcap-ng is a library providing an alternate mechanism to libcap to inspect and set Linux process and file capabilities (modeled upon a withdrawn POSIX.1e draft). -%package -n python-capng +%package -n python2-capng Summary: Python bindings for libcap-ng library Group: Development/Libraries/Python -BuildRequires: libcap-ng-devel = %{version} -BuildRequires: python-devel -BuildRequires: swig Requires: libcap-ng%{sover} = %{version} -%description -n python-capng +%description -n python2-capng The libcap-ng-python package contains the bindings so that libcap-ng and can be used by Python applications. +%package -n python3-capng +Summary: Python bindings for libcap-ng library +Group: Development/Libraries/Python +Requires: libcap-ng%{sover} = %{version} + +%description -n python3-capng +The libcap-ng-python package contains the bindings so that libcap-ng +and can be used by Python applications. + + %prep %setup -q -n libcap-ng-%{version} %build %configure \ --disable-static \ +%if %{with python2} --with-python \ - --without-python3 +%endif + --with-python3 make %{?_smp_mflags} %install +%if %{with python2} %make_install -C bindings/python +%endif +%make_install -C bindings/python3 find %{buildroot} -type f -name "*.la" -delete -print -%files -n python-capng -%{python_sitearch}/_capng.so -%{python_sitearch}/capng.py* +%if %{with python2} +%files -n python2-capng +%{python2_sitearch}/* +%endif + +%files -n python3-capng +%{python3_sitearch}/* %changelog diff --git a/libcap-ng.changes b/libcap-ng.changes index aaf9e88..5f2020e 100644 --- a/libcap-ng.changes +++ b/libcap-ng.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 20 10:16:07 UTC 2018 - tchvatal@suse.com + +- Move %doc to %license for licenses + ------------------------------------------------------------------- Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de diff --git a/libcap-ng.spec b/libcap-ng.spec index 43211a8..fcfcf83 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -83,7 +83,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %postun -n %{name}%{sover} -p /sbin/ldconfig %files -n %{name}%{sover} -%doc COPYING.LIB +%license COPYING.LIB %{_libdir}/%{name}.so.%{sover} %{_libdir}/%{name}.so.%{sover}.* @@ -95,7 +95,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_libdir}/pkgconfig/%{name}.pc %files utils -%doc COPYING +%license COPYING %{_bindir}/captest %{_bindir}/filecap %{_bindir}/netcap