]> git.pld-linux.org Git - packages/libcap-ng.git/blame - libcap-ng.spec
- rel 5; fix epoch dpes
[packages/libcap-ng.git] / libcap-ng.spec
CommitLineData
a97a426a
JK
1#
2# Conditional build:
f37d7666
JB
3%bcond_without python # (any) Python bindings
4%bcond_without python2 # CPython 2 bindings
5%bcond_without python3 # CPython 3 bindings
a97a426a 6#
f37d7666
JB
7%if %{without python}
8%undefine with_python2
9%undefine with_python3
10%endif
9a73f910
JB
11Summary: Next Generation of POSIX capabilities library
12Summary(pl.UTF-8): Biblioteka POSIX capabilities nowej generacji
13Name: libcap-ng
7b23f2d1 14Version: 0.7.8
19313a42 15Release: 5
a4f6b392 16Epoch: 1
9a73f910
JB
17License: LGPL v2.1+ (library), GPL v2+ (utilities)
18Group: Libraries
19Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
7b23f2d1 20# Source0-md5: 0dece96644bd798020e170fbf7663802
e64f4261 21Patch0: vserver.patch
9a73f910
JB
22URL: http://people.redhat.com/sgrubb/libcap-ng/
23BuildRequires: attr-devel
131c6123 24BuildRequires: automake
e64f4261 25BuildRequires: linux-libc-headers >= 7:2.6.33.1
f37d7666
JB
26%{?with_python2:BuildRequires: python-devel >= 2}
27%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
9a73f910
JB
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.219
a97a426a 30%{?with_python:BuildRequires: swig-python}
9a73f910
JB
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34The libcap-ng library should make programming with POSIX capabilities
35easier. The library has some utilities to help you analyse a system
36for apps that may have too much privileges.
37
38%description -l pl.UTF-8
39Biblioteka libcap-ng powinna uczynić programowanie POSIX-owych
40capabilities łatwiejszym. Zawiera narzędzia pomagające w analizie
41systemu pod kątem aplikacji posiadających zbyt duże uprawnienia.
42
43%package devel
44Summary: Header files for libcap-ng library
45Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng
46License: LGPL v2.1+
47Group: Development/Libraries
48Requires: %{name} = %{version}-%{release}
49Requires: linux-libc-headers >= 7:2.6.26
50
51%description devel
52Header files for libcap-ng library.
53
54%description devel -l pl.UTF-8
55Pliki nagłówkowe biblioteki libcap-ng.
56
57%package static
58Summary: Static libcap-ng library
59Summary(pl.UTF-8): Statyczna biblioteka libcap-ng
60License: LGPL v2.1+
61Group: Development/Libraries
19313a42 62Requires: %{name}-devel = %{epoch}:%{version}-%{release}
9a73f910
JB
63
64%description static
65Static libcap-ng library.
66
67%description static -l pl.UTF-8
68Statyczna biblioteka libcap-ng.
69
70%package utils
71Summary: Utilities for analysing and setting file capabilities
72Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików
73License: GPL v2+
74Group: Applications/System
19313a42 75Requires: %{name} = %{epoch}:%{version}-%{release}
9a73f910
JB
76
77%description utils
78This package contains applications to analyse the POSIX capabilities
79of all the program running on a system. It also lets you set the file
80system based capabilities.
81
d92d486f 82%description utils -l pl.UTF-8
9a73f910
JB
83Ten pakiet zawiera aplikacje do analizy POSIX-owych capabilities
84wszystkich programów działających w systemie; pozwala także ustawiać
85capabilities w systemie plików.
86
87%package -n python-capng
f37d7666
JB
88Summary: Python 2 interface to libcap-ng library
89Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki libcap-ng
9a73f910 90Group: Libraries/Python
19313a42 91Requires: %{name} = %{epoch}:%{version}-%{release}
9a73f910
JB
92
93%description -n python-capng
f37d7666 94Python 2 interface to libcap-ng library.
9a73f910
JB
95
96%description -n python-capng -l pl.UTF-8
f37d7666
JB
97Interfejs Pythona 2 do biblioteki libcap-ng.
98
99%package -n python3-capng
100Summary: Python 3 interface to libcap-ng library
101Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki libcap-ng
102Group: Libraries/Python
19313a42 103Requires: %{name} = %{epoch}:%{version}-%{release}
f37d7666
JB
104
105%description -n python3-capng
106Python 3 interface to libcap-ng library.
107
108%description -n python3-capng -l pl.UTF-8
109Interfejs Pythona 3 do biblioteki libcap-ng.
9a73f910
JB
110
111%prep
112%setup -q
e64f4261 113%patch0 -p1
9a73f910 114
9434d679 115# force regeneration after captab.h change in vserver patch
f37d7666 116%{__rm} bindings/{python,python3}/capng.py
9434d679 117
9a73f910 118%build
f37d7666
JB
119%configure \
120 %{!?with_python2:--without-python} \
121 %{!?with_python3:--without-python3}
9a73f910
JB
122%{__make}
123
124%install
125rm -rf $RPM_BUILD_ROOT
126
127%{__make} install \
128 DESTDIR=$RPM_BUILD_ROOT
129
130install -d $RPM_BUILD_ROOT/%{_lib}
131mv $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib}
667d74fd 132ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcap-ng.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so
9a73f910 133
f37d7666 134%if %{with python2}
9a73f910 135%py_postclean
7a591dee 136%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_capng.la
a97a426a 137%endif
f37d7666
JB
138%if %{with python3}
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}
142%endif
9a73f910
JB
143
144%clean
145rm -rf $RPM_BUILD_ROOT
146
147%post -p /sbin/ldconfig
148%postun -p /sbin/ldconfig
149
150%files
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
155
156%files devel
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*
164
165%files static
166%defattr(644,root,root,755)
167%{_libdir}/libcap-ng.a
168
169%files utils
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*
179
f37d7666 180%if %{with python2}
9a73f910
JB
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]
a97a426a 185%endif
f37d7666
JB
186
187%if %{with python3}
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]
193%endif
This page took 0.325563 seconds and 4 git commands to generate.