3
0
forked from pool/libcap-ng

- Switch to singlespec approach to allow building of python3

bindings

- Move %doc to %license for licenses

OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=33
This commit is contained in:
Tomáš Chvátal 2018-02-20 10:29:37 +00:00 committed by Git OBS Bridge
parent 39c582e8ea
commit f2bbc47251
4 changed files with 44 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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