c318f97
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
7c14f08
bf27b13
Summary: An alternate posix capabilities library
bf27b13
Name: libcap-ng
3a5a606
Version: 0.6.4
a6341b4
Release: 4%{?dist}
bf27b13
License: LGPLv2+
bf27b13
Group: System Environment/Libraries
bf27b13
URL: http://people.redhat.com/sgrubb/libcap-ng
bf27b13
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
29079c5
Patch1: libcap-ng-0.6.5-device.patch
bf27b13
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
bf27b13
BuildRequires: kernel-headers >= 2.6.11 
bf27b13
BuildRequires: libattr-devel
bf27b13
bf27b13
%description
bf27b13
Libcap-ng is a library that makes using posix capabilities easier
bf27b13
bf27b13
%package devel
bf27b13
Summary: Header files for libcap-ng library
bf27b13
License: LGPLv2+
bf27b13
Group: Development/Libraries
bf27b13
Requires: kernel-headers >= 2.6.11
bf27b13
Requires: %{name} = %{version}-%{release}
c318f97
Requires: pkgconfig
bf27b13
bf27b13
%description devel
bf27b13
The libcap-ng-devel package contains the files needed for developing
bf27b13
applications that need to use the libcap-ng library.
bf27b13
7c14f08
%package python
7c14f08
Summary: Python bindings for libcap-ng library
7c14f08
License: LGPLv2+
7c14f08
Group: Development/Libraries
7c14f08
BuildRequires: python-devel swig
7c14f08
Requires: %{name} = %{version}-%{release}
7c14f08
7c14f08
%description python
7c14f08
The libcap-ng-python package contains the bindings so that libcap-ng
7c14f08
and can be used by python applications.
7c14f08
bf27b13
%package utils
bf27b13
Summary: Utilities for analysing and setting file capabilities
bf27b13
License: GPLv2+
bf27b13
Group: Development/Libraries
76b62a2
Requires: %{name} = %{version}-%{release}
bf27b13
bf27b13
%description utils
bf27b13
The libcap-ng-utils package contains applications to analyse the
bf27b13
posix capabilities of all the program running on a system. It also
bf27b13
lets you set the file system based capabilities.
bf27b13
bf27b13
%prep
bf27b13
%setup -q
29079c5
%patch1 -p1
bf27b13
bf27b13
%build
bf27b13
%configure --libdir=/%{_lib}
bf27b13
make %{?_smp_mflags}
bf27b13
bf27b13
%install
bf27b13
rm -rf $RPM_BUILD_ROOT
bf27b13
make DESTDIR="${RPM_BUILD_ROOT}" install
bf27b13
bf27b13
# Move the symlink
bf27b13
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
bf27b13
mkdir -p $RPM_BUILD_ROOT%{_libdir}
bf27b13
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
bf27b13
LIBNAME=$(basename $VLIBNAME)
bf27b13
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
bf27b13
2735880
# Move the pkgconfig file
2735880
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
2735880
bf27b13
# Remove a couple things so they don't get picked up
bf27b13
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.la
bf27b13
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a
7c14f08
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.a
7c14f08
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.la
bf27b13
bf27b13
%clean
bf27b13
rm -rf $RPM_BUILD_ROOT
bf27b13
bf27b13
%post -p /sbin/ldconfig
bf27b13
bf27b13
%postun -p /sbin/ldconfig
bf27b13
bf27b13
bf27b13
%files
bf27b13
%defattr(-,root,root,-)
bf27b13
%doc COPYING.LIB
bf27b13
%attr(0755,root,root) /%{_lib}/libcap-ng.so.*
bf27b13
bf27b13
%files devel
bf27b13
%defattr(-,root,root,-)
bf27b13
%attr(0644,root,root) %{_mandir}/man3/*
bf27b13
%attr(0644,root,root) %{_includedir}/cap-ng.h
bf27b13
%attr(0755,root,root) %{_libdir}/libcap-ng.so
7c14f08
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
2735880
%{_libdir}/pkgconfig/libcap-ng.pc
7c14f08
7c14f08
%files python
7c14f08
%defattr(-,root,root,-)
7c14f08
%attr(755,root,root) /%{_libdir}/python?.?/site-packages/_capng.so
7c14f08
%{python_sitearch}/capng.py*
bf27b13
bf27b13
%files utils
bf27b13
%defattr(-,root,root,-)
bf27b13
%doc COPYING
bf27b13
%attr(0755,root,root) %{_bindir}/*
bf27b13
%attr(0644,root,root) %{_mandir}/man8/*
bf27b13
bf27b13
%changelog
a6341b4
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.4-4
a6341b4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a6341b4
47fda40
* Thu Jun 17 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-3
29079c5
- Only open regular files in filecap
29079c5
76b62a2
* Mon May 24 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-2
76b62a2
- In utils subpackage added a requires statement.
76b62a2
3a5a606
* Thu May 06 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-1
3a5a606
- New upstream release fixing multi-threading issue
3a5a606
13bd145
* Wed Apr 28 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-2
13bd145
- filecap shows full capabilities if a file has any
13bd145
2158dcf
* Thu Mar 11 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-1
2158dcf
- New upstream release
2158dcf
c318f97
* Tue Feb 16 2010 Steve Grubb <sgrubb@redhat.com> 0.6.2-4
c318f97
- Use global macro and require pkgconfig for devel subpackage
c318f97
c318f97
* Fri Oct 09 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-3
c318f97
- Apply patch to retain setpcap only if clearing bounding set
c318f97
c318f97
* Sat Oct 03 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-2
c318f97
- Apply patch correcting pscap and netcap acct detection
c318f97
2735880
* Mon Sep 28 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-1
2735880
- New upstream release
2735880
e8c3858
* Sun Jul 26 2009 Steve Grubb <sgrubb@redhat.com> 0.6.1-1
e8c3858
- New upstream release
e8c3858
09143d6
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
09143d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
09143d6
7c14f08
* Mon Jun 29 2009 Steve Grubb <sgrubb@redhat.com> 0.6-1
7c14f08
- New upstream release
7c14f08
195773f
* Sun Jun 21 2009 Steve Grubb <sgrubb@redhat.com> 0.5.1-1
195773f
- New upstream release
195773f
64e9d49
* Fri Jun 19 2009 Steve Grubb <sgrubb@redhat.com> 0.5-1
64e9d49
- New upstream release
64e9d49
d12dec3
* Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.2-1
d12dec3
- New upstream release
d12dec3
708d16f
* Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.1-1
bf27b13
- Initial build.
bf27b13