3 %bcond_without python # (any) Python bindings
4 %bcond_without python2 # CPython 2 bindings
5 %bcond_without python3 # CPython 3 bindings
11 Summary: Next Generation of POSIX capabilities library
12 Summary(pl.UTF-8): Biblioteka POSIX capabilities nowej generacji
15 # 0.7.9 is broken, see https://github.com/stevegrubb/libcap-ng/issues/5
17 License: LGPL v2.1+ (library), GPL v2+ (utilities)
19 Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
20 # Source0-md5: 2398d695508fab9ce33668c53a89b0e9
22 URL: http://people.redhat.com/sgrubb/libcap-ng/
23 BuildRequires: attr-devel
24 BuildRequires: automake
25 BuildRequires: linux-libc-headers >= 7:2.6.33.1
26 %{?with_python2:BuildRequires: python-devel >= 2}
27 %{?with_python3:BuildRequires: python3-devel >= 1:3.2}
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.219
30 %{?with_python:BuildRequires: swig-python}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The libcap-ng library should make programming with POSIX capabilities
35 easier. The library has some utilities to help you analyse a system
36 for apps that may have too much privileges.
38 %description -l pl.UTF-8
39 Biblioteka libcap-ng powinna uczynić programowanie POSIX-owych
40 capabilities łatwiejszym. Zawiera narzędzia pomagające w analizie
41 systemu pod kątem aplikacji posiadających zbyt duże uprawnienia.
44 Summary: Header files for libcap-ng library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: linux-libc-headers >= 7:2.6.26
52 Header files for libcap-ng library.
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki libcap-ng.
58 Summary: Static libcap-ng library
59 Summary(pl.UTF-8): Statyczna biblioteka libcap-ng
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}-%{release}
65 Static libcap-ng library.
67 %description static -l pl.UTF-8
68 Statyczna biblioteka libcap-ng.
71 Summary: Utilities for analysing and setting file capabilities
72 Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików
74 Group: Applications/System
75 Requires: %{name} = %{version}-%{release}
78 This package contains applications to analyse the POSIX capabilities
79 of all the program running on a system. It also lets you set the file
80 system based capabilities.
82 %description utils -l pl.UTF-8
83 Ten pakiet zawiera aplikacje do analizy POSIX-owych capabilities
84 wszystkich programów działających w systemie; pozwala także ustawiać
85 capabilities w systemie plików.
87 %package -n python-capng
88 Summary: Python 2 interface to libcap-ng library
89 Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki libcap-ng
90 Group: Libraries/Python
91 Requires: %{name} = %{version}-%{release}
93 %description -n python-capng
94 Python 2 interface to libcap-ng library.
96 %description -n python-capng -l pl.UTF-8
97 Interfejs Pythona 2 do biblioteki libcap-ng.
99 %package -n python3-capng
100 Summary: Python 3 interface to libcap-ng library
101 Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki libcap-ng
102 Group: Libraries/Python
103 Requires: %{name} = %{version}-%{release}
105 %description -n python3-capng
106 Python 3 interface to libcap-ng library.
108 %description -n python3-capng -l pl.UTF-8
109 Interfejs Pythona 3 do biblioteki libcap-ng.
115 # force regeneration after captab.h change in vserver patch
116 %{__rm} bindings/{python,python3}/capng.py
120 %{!?with_python2:--without-python} \
121 %{!?with_python3:--without-python3}
125 rm -rf $RPM_BUILD_ROOT
128 DESTDIR=$RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT/%{_lib}
131 %{__mv} $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib}
132 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcap-ng.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so
136 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_capng.la
139 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_capng.la
140 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
141 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
145 rm -rf $RPM_BUILD_ROOT
147 %post -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
151 %defattr(644,root,root,755)
152 %doc AUTHORS ChangeLog README
153 %attr(755,root,root) /%{_lib}/libcap-ng.so.*.*.*
154 %attr(755,root,root) %ghost /%{_lib}/libcap-ng.so.0
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libcap-ng.so
159 %{_libdir}/libcap-ng.la
160 %{_includedir}/cap-ng.h
161 %{_pkgconfigdir}/libcap-ng.pc
162 %{_aclocaldir}/cap-ng.m4
163 %{_mandir}/man3/capng_*.3*
166 %defattr(644,root,root,755)
167 %{_libdir}/libcap-ng.a
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/captest
172 %attr(755,root,root) %{_bindir}/filecap
173 %attr(755,root,root) %{_bindir}/netcap
174 %attr(755,root,root) %{_bindir}/pscap
175 %{_mandir}/man8/captest.8*
176 %{_mandir}/man8/filecap.8*
177 %{_mandir}/man8/netcap.8*
178 %{_mandir}/man8/pscap.8*
181 %files -n python-capng
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{py_sitedir}/_capng.so
184 %{py_sitedir}/capng.py[co]
188 %files -n python3-capng
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{py3_sitedir}/_capng.so
191 %{py3_sitedir}/capng.py
192 %{py3_sitedir}/__pycache__/capng.cpython-*.py[co]