2011-08-31 04:34:50 +02:00
|
|
|
#
|
2011-08-31 10:50:02 +02:00
|
|
|
# spec file for package libcap-ng
|
2011-08-31 04:34:50 +02:00
|
|
|
#
|
2011-08-31 10:50:02 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-08-31 04:34:50 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
|
|
2011-08-31 04:34:50 +02:00
|
|
|
Summary: An alternate POSIX capabilities library
|
|
|
|
|
|
|
|
Name: libcap-ng
|
|
|
|
Version: 0.6.6
|
|
|
|
Release: 1
|
2010-04-23 01:41:07 +02:00
|
|
|
%define soname 0
|
2010-11-02 16:42:38 +01:00
|
|
|
%define rname libcap-ng
|
2011-08-31 04:34:50 +02:00
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Libraries
|
|
|
|
Url: http://people.redhat.com/sgrubb/libcap-ng
|
2010-04-23 01:41:07 +02:00
|
|
|
# http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
|
2011-08-31 04:34:50 +02:00
|
|
|
Source0: libcap-ng-%{version}.tar.bz2
|
|
|
|
Source1: pre_checkin.sh
|
|
|
|
Source2: baselibs.conf
|
|
|
|
Source99: libcap-ng.rpmlintrc
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: kernel-headers >= 2.6.11
|
|
|
|
BuildRequires: libattr-devel pkg-config python-base
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Libcap-ng is a library that makes using posix capabilities easier
|
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%if "%{name}" == "%{rname}"
|
2011-08-31 04:34:50 +02:00
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%package -n %{name}%{soname}
|
2011-08-31 04:34:50 +02:00
|
|
|
|
|
|
|
Summary: An alternate POSIX capabilities library
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: System/Libraries
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%description -n %{name}%{soname}
|
|
|
|
Libcap-ng is a library that makes using posix capabilities easier
|
|
|
|
|
|
|
|
%package devel
|
2011-08-31 10:50:02 +02:00
|
|
|
|
2011-08-31 04:34:50 +02:00
|
|
|
Summary: Header files for libcap-ng library
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: kernel-headers >= 2.6.11
|
|
|
|
Requires: %{name}%{soname} = %{version}
|
|
|
|
Requires: pkgconfig
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The libcap-ng-devel package contains the files needed for developing
|
|
|
|
applications that need to use the libcap-ng library.
|
|
|
|
|
|
|
|
%package utils
|
2011-08-31 10:50:02 +02:00
|
|
|
|
2011-08-31 04:34:50 +02:00
|
|
|
Summary: Utilities for analysing and setting file capabilities
|
|
|
|
License: GPLv2+
|
|
|
|
Group: System/Base
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%description utils
|
|
|
|
The libcap-ng-utils package contains applications to analyse the
|
|
|
|
posix capabilities of all the program running on a system. It also
|
|
|
|
lets you set the file system based capabilities.
|
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%else
|
2011-08-31 04:34:50 +02:00
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%package -n python-capng
|
2011-08-31 04:34:50 +02:00
|
|
|
Summary: Python bindings for libcap-ng library
|
|
|
|
License: LGPLv2+
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
BuildRequires: python-devel swig
|
|
|
|
Requires: %{rname}%{soname} = %{version}
|
2010-11-02 16:42:38 +01:00
|
|
|
%py_requires
|
|
|
|
|
|
|
|
%description -n python-capng
|
|
|
|
The libcap-ng-python package contains the bindings so that libcap-ng
|
|
|
|
and can be used by python applications.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%prep
|
2010-11-02 16:42:38 +01:00
|
|
|
%setup -q -n %{rname}-%{version}
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%build
|
2011-10-06 17:07:44 +02:00
|
|
|
%configure --libdir="/%{_lib}" --with-python=no
|
2010-11-02 16:08:55 +01:00
|
|
|
%__make %{?_smp_mflags}
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%install
|
2010-10-06 23:09:46 +02:00
|
|
|
%__make DESTDIR="%{buildroot}" install
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
# Move the symlink
|
2010-11-02 16:42:38 +01:00
|
|
|
%__rm -f "%{buildroot}/%{_lib}/%{rname}.so"
|
2010-10-06 23:09:46 +02:00
|
|
|
%__mkdir_p "%{buildroot}%{_libdir}"
|
2010-11-02 16:42:38 +01:00
|
|
|
VLIBNAME=$(/bin/ls -1 "%{buildroot}/%{_lib}/%{rname}.so".*.*.*)
|
|
|
|
[ -n "$VLIBNAME" ] || { echo "ERROR: failed to find %{buildroot}/%{_lib}/%{rname}.so.*.*.*" >&2; exit 1; }
|
2010-10-06 23:09:46 +02:00
|
|
|
LIBNAME=$(basename "$VLIBNAME")
|
2010-11-02 16:42:38 +01:00
|
|
|
%__ln_s "../../%{_lib}/$LIBNAME" "%{buildroot}%{_libdir}/%{rname}.so"
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
# Move the pkgconfig file
|
2010-10-06 23:09:46 +02:00
|
|
|
%__install -d "%{buildroot}%{_libdir}"
|
|
|
|
%__mv "%{buildroot}/%{_lib}/pkgconfig" "%{buildroot}%{_libdir}/pkgconfig"
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
# Remove a couple things so they don't get picked up
|
2010-11-02 16:42:38 +01:00
|
|
|
%__rm -f "%{buildroot}/%{_lib}/%{rname}".{a,la}
|
2010-10-06 23:09:46 +02:00
|
|
|
%__rm -f "%{buildroot}%{python_sitearch}/_capng".{a,la}
|
2010-04-23 01:41:07 +02:00
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%if "%{name}" == "%{rname}-python"
|
|
|
|
%__rm -f %{buildroot}/%{_lib}/lib*.so*
|
|
|
|
%__rm -f %{buildroot}/%{_libdir}/lib*.so*
|
|
|
|
%__rm -rf %{buildroot}/%{_libdir}/pkgconfig
|
|
|
|
%__rm -rf %{buildroot}/%{_bindir}
|
|
|
|
%__rm -rf %{buildroot}/%{_mandir}
|
|
|
|
%__rm -rf %{buildroot}/%{_includedir}
|
|
|
|
%__rm -rf %{buildroot}/%{_datadir}/aclocal
|
|
|
|
%endif
|
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%clean
|
2010-10-06 23:09:46 +02:00
|
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
2010-04-23 01:41:07 +02:00
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%if "%{name}" == "%{rname}"
|
2011-08-31 04:34:50 +02:00
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%post -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %{name}%{soname}
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING.LIB
|
2010-11-02 16:42:38 +01:00
|
|
|
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}
|
|
|
|
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}.*
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%attr(0644,root,root) %{_mandir}/man3/*.3%{ext_man}
|
|
|
|
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
2010-11-02 16:42:38 +01:00
|
|
|
%attr(0755,root,root) %{_libdir}/%{rname}.so
|
2010-04-23 01:41:07 +02:00
|
|
|
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
2010-11-02 16:42:38 +01:00
|
|
|
%{_libdir}/pkgconfig/%{rname}.pc
|
2010-04-23 01:41:07 +02:00
|
|
|
|
|
|
|
%files utils
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING
|
|
|
|
%attr(0755,root,root) %{_bindir}/captest
|
|
|
|
%attr(0755,root,root) %{_bindir}/filecap
|
|
|
|
%attr(0755,root,root) %{_bindir}/netcap
|
|
|
|
%attr(0755,root,root) %{_bindir}/pscap
|
|
|
|
%attr(0644,root,root) %{_mandir}/man8/*.8%{ext_man}
|
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%else
|
2011-08-31 04:34:50 +02:00
|
|
|
|
2010-11-02 16:42:38 +01:00
|
|
|
%files -n python-capng
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%attr(755,root,root) %{python_sitearch}/_capng.so
|
|
|
|
%{python_sitearch}/capng.py*
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2010-04-23 01:41:07 +02:00
|
|
|
%changelog
|