]> git.pld-linux.org Git - packages/libcap-ng.git/blame - libcap-ng.spec
rerun autotools
[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
92eafb68 14Version: 0.7.10
c9e3e4e4 15Release: 2
4780db2a 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
92eafb68 20# Source0-md5: 57dc267e2949cdecb651a929f9206572
e64f4261 21Patch0: vserver.patch
92eafb68 22Patch1: unloadable.patch
9a73f910
JB
23URL: http://people.redhat.com/sgrubb/libcap-ng/
24BuildRequires: attr-devel
f8341585 25BuildRequires: autoconf >= 2.12
131c6123 26BuildRequires: automake
e64f4261 27BuildRequires: linux-libc-headers >= 7:2.6.33.1
f37d7666
JB
28%{?with_python2:BuildRequires: python-devel >= 2}
29%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
9a73f910
JB
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.219
a97a426a 32%{?with_python:BuildRequires: swig-python}
9a73f910
JB
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36The libcap-ng library should make programming with POSIX capabilities
37easier. The library has some utilities to help you analyse a system
38for apps that may have too much privileges.
39
40%description -l pl.UTF-8
41Biblioteka libcap-ng powinna uczynić programowanie POSIX-owych
42capabilities łatwiejszym. Zawiera narzędzia pomagające w analizie
43systemu pod kątem aplikacji posiadających zbyt duże uprawnienia.
44
45%package devel
46Summary: Header files for libcap-ng library
47Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng
48License: LGPL v2.1+
49Group: Development/Libraries
4780db2a 50Requires: %{name} = %{epoch}:%{version}-%{release}
9a73f910
JB
51Requires: linux-libc-headers >= 7:2.6.26
52
53%description devel
54Header files for libcap-ng library.
55
56%description devel -l pl.UTF-8
57Pliki nagłówkowe biblioteki libcap-ng.
58
59%package static
60Summary: Static libcap-ng library
61Summary(pl.UTF-8): Statyczna biblioteka libcap-ng
62License: LGPL v2.1+
63Group: Development/Libraries
4780db2a 64Requires: %{name}-devel = %{epoch}:%{version}-%{release}
9a73f910
JB
65
66%description static
67Static libcap-ng library.
68
69%description static -l pl.UTF-8
70Statyczna biblioteka libcap-ng.
71
72%package utils
73Summary: Utilities for analysing and setting file capabilities
74Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików
75License: GPL v2+
76Group: Applications/System
4780db2a 77Requires: %{name} = %{epoch}:%{version}-%{release}
9a73f910
JB
78
79%description utils
80This package contains applications to analyse the POSIX capabilities
81of all the program running on a system. It also lets you set the file
82system based capabilities.
83
d92d486f 84%description utils -l pl.UTF-8
9a73f910
JB
85Ten pakiet zawiera aplikacje do analizy POSIX-owych capabilities
86wszystkich programów działających w systemie; pozwala także ustawiać
87capabilities w systemie plików.
88
89%package -n python-capng
f37d7666
JB
90Summary: Python 2 interface to libcap-ng library
91Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki libcap-ng
9a73f910 92Group: Libraries/Python
4780db2a 93Requires: %{name} = %{epoch}:%{version}-%{release}
9a73f910
JB
94
95%description -n python-capng
f37d7666 96Python 2 interface to libcap-ng library.
9a73f910
JB
97
98%description -n python-capng -l pl.UTF-8
f37d7666
JB
99Interfejs Pythona 2 do biblioteki libcap-ng.
100
101%package -n python3-capng
102Summary: Python 3 interface to libcap-ng library
103Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki libcap-ng
104Group: Libraries/Python
4780db2a 105Requires: %{name} = %{epoch}:%{version}-%{release}
f37d7666
JB
106
107%description -n python3-capng
108Python 3 interface to libcap-ng library.
109
110%description -n python3-capng -l pl.UTF-8
111Interfejs Pythona 3 do biblioteki libcap-ng.
9a73f910
JB
112
113%prep
114%setup -q
e64f4261 115%patch0 -p1
92eafb68 116%patch1 -p1
9a73f910 117
9434d679 118# force regeneration after captab.h change in vserver patch
f37d7666 119%{__rm} bindings/{python,python3}/capng.py
9434d679 120
9a73f910 121%build
f8341585
JP
122%{__aclocal}
123%{__autoconf}
124%{__automake}
f37d7666
JB
125%configure \
126 %{!?with_python2:--without-python} \
127 %{!?with_python3:--without-python3}
9a73f910
JB
128%{__make}
129
130%install
131rm -rf $RPM_BUILD_ROOT
132
133%{__make} install \
134 DESTDIR=$RPM_BUILD_ROOT
135
136install -d $RPM_BUILD_ROOT/%{_lib}
d13b41aa 137%{__mv} $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib}
667d74fd 138ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcap-ng.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so
9a73f910 139
f37d7666 140%if %{with python2}
9a73f910 141%py_postclean
7a591dee 142%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_capng.la
a97a426a 143%endif
f37d7666
JB
144%if %{with python3}
145%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_capng.la
146%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
147%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
148%endif
9a73f910
JB
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%post -p /sbin/ldconfig
154%postun -p /sbin/ldconfig
155
156%files
157%defattr(644,root,root,755)
158%doc AUTHORS ChangeLog README
159%attr(755,root,root) /%{_lib}/libcap-ng.so.*.*.*
160%attr(755,root,root) %ghost /%{_lib}/libcap-ng.so.0
161
162%files devel
163%defattr(644,root,root,755)
164%attr(755,root,root) %{_libdir}/libcap-ng.so
165%{_libdir}/libcap-ng.la
166%{_includedir}/cap-ng.h
167%{_pkgconfigdir}/libcap-ng.pc
168%{_aclocaldir}/cap-ng.m4
169%{_mandir}/man3/capng_*.3*
170
171%files static
172%defattr(644,root,root,755)
173%{_libdir}/libcap-ng.a
174
175%files utils
176%defattr(644,root,root,755)
177%attr(755,root,root) %{_bindir}/captest
178%attr(755,root,root) %{_bindir}/filecap
179%attr(755,root,root) %{_bindir}/netcap
180%attr(755,root,root) %{_bindir}/pscap
181%{_mandir}/man8/captest.8*
182%{_mandir}/man8/filecap.8*
183%{_mandir}/man8/netcap.8*
184%{_mandir}/man8/pscap.8*
185
f37d7666 186%if %{with python2}
9a73f910
JB
187%files -n python-capng
188%defattr(644,root,root,755)
189%attr(755,root,root) %{py_sitedir}/_capng.so
190%{py_sitedir}/capng.py[co]
a97a426a 191%endif
f37d7666
JB
192
193%if %{with python3}
194%files -n python3-capng
195%defattr(644,root,root,755)
196%attr(755,root,root) %{py3_sitedir}/_capng.so
197%{py3_sitedir}/capng.py
198%{py3_sitedir}/__pycache__/capng.cpython-*.py[co]
199%endif
This page took 0.097814 seconds and 4 git commands to generate.