118 lines
3.4 KiB
RPMSpec
118 lines
3.4 KiB
RPMSpec
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
Summary: Libcap-ng is a library used for posix capabilities programming
|
|
Name: libcap-ng
|
|
Version: 0.7.9
|
|
Release: 7
|
|
License: LGPLv2+ and GPLv2+
|
|
URL: http://people.redhat.com/sgrubb/libcap-ng
|
|
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
|
BuildRequires: gcc, kernel-headers >= 2.6.11, libattr-devel
|
|
Provides: %{name}-utils = %{version}-%{release}
|
|
Obsoletes: %{name}-utils < %{version}-%{release}
|
|
|
|
%description
|
|
The libcap-ng library is intended to make programming with posix
|
|
capabilities much easier than the traditional libcap library.It
|
|
includes utilities that can analyse all currently running applications
|
|
and print out any capabilities and whether or not it has an open
|
|
ended bounding set.
|
|
|
|
%package devel
|
|
Summary: Development libraries and header files for %{name}
|
|
License: LGPLv2+
|
|
Requires: kernel-headers >= 2.6.11
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: pkgconfig
|
|
|
|
%description devel
|
|
The %{name}-devel package contains the files needed for developing
|
|
applications that need to use the %{name} library.
|
|
|
|
%package -n python2-libcap-ng
|
|
%{?python_provide:%python_provide python2-libcap-ng}
|
|
Summary: Python2 bindings for libcap-ng library
|
|
License: LGPLv2+
|
|
BuildRequires: python2-devel swig
|
|
Requires: %{name} = %{version}-%{release}
|
|
Provides: %{name}-python = %{version}-%{release}
|
|
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
|
Obsoletes: %{name}-python < %{version}-%{release}
|
|
|
|
%description -n python2-libcap-ng
|
|
The python2-%{name} package contains the bindings so that %{name} and
|
|
can be used by python2 applications.
|
|
|
|
%package python3
|
|
Summary: Python3 bindings for libcap-ng library
|
|
License: LGPLv2+
|
|
BuildRequires: python3-devel swig
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description python3
|
|
The %{name}-python3 package contains the bindings so that %{name} and
|
|
can be used by python3 applications.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%configure --libdir=/%{_lib} --with-python --with-python3
|
|
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install
|
|
|
|
# Move from %{_lib} to %{_libdir}
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
|
|
LIBNAME=$(basename $VLIBNAME)
|
|
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
|
|
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
|
|
mv $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
%delete_la
|
|
|
|
%check
|
|
make check
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license COPYING.LIB COPYING
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
/%{_lib}/libcap-ng.so.*
|
|
|
|
%files devel
|
|
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
|
%{_libdir}/libcap-ng.so
|
|
%{_libdir}/libcap-ng.a
|
|
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
|
%{_libdir}/pkgconfig/libcap-ng.pc
|
|
|
|
%files -n python2-libcap-ng
|
|
%attr(755,root,root) %{python2_sitearch}/_capng.so
|
|
%{python2_sitearch}/capng.py*
|
|
|
|
%files python3
|
|
%attr(755,root,root) %{python3_sitearch}/*
|
|
%{python3_sitearch}/capng.py*
|
|
|
|
%files help
|
|
%attr(0644,root,root) %{_mandir}/man3/*
|
|
%attr(0644,root,root) %{_mandir}/man8/*
|
|
|
|
%changelog
|
|
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-7
|
|
- Delete unused patch
|
|
|
|
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-6
|
|
- Delete unused patch
|
|
|
|
* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-5
|
|
- Package init
|