]>
Commit | Line | Data |
---|---|---|
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 |
11 | Summary: Next Generation of POSIX capabilities library |
12 | Summary(pl.UTF-8): Biblioteka POSIX capabilities nowej generacji | |
13 | Name: libcap-ng | |
92eafb68 | 14 | Version: 0.7.10 |
c9e3e4e4 | 15 | Release: 2 |
4780db2a | 16 | Epoch: 1 |
9a73f910 JB |
17 | License: LGPL v2.1+ (library), GPL v2+ (utilities) |
18 | Group: Libraries | |
19 | Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz | |
92eafb68 | 20 | # Source0-md5: 57dc267e2949cdecb651a929f9206572 |
e64f4261 | 21 | Patch0: vserver.patch |
92eafb68 | 22 | Patch1: unloadable.patch |
9a73f910 JB |
23 | URL: http://people.redhat.com/sgrubb/libcap-ng/ |
24 | BuildRequires: attr-devel | |
f8341585 | 25 | BuildRequires: autoconf >= 2.12 |
131c6123 | 26 | BuildRequires: automake |
e64f4261 | 27 | BuildRequires: 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 |
30 | BuildRequires: rpm-pythonprov |
31 | BuildRequires: rpmbuild(macros) >= 1.219 | |
a97a426a | 32 | %{?with_python:BuildRequires: swig-python} |
9a73f910 JB |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | The libcap-ng library should make programming with POSIX capabilities | |
37 | easier. The library has some utilities to help you analyse a system | |
38 | for apps that may have too much privileges. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Biblioteka libcap-ng powinna uczynić programowanie POSIX-owych | |
42 | capabilities łatwiejszym. Zawiera narzędzia pomagające w analizie | |
43 | systemu pod kątem aplikacji posiadających zbyt duże uprawnienia. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for libcap-ng library | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng | |
48 | License: LGPL v2.1+ | |
49 | Group: Development/Libraries | |
4780db2a | 50 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9a73f910 JB |
51 | Requires: linux-libc-headers >= 7:2.6.26 |
52 | ||
53 | %description devel | |
54 | Header files for libcap-ng library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki libcap-ng. | |
58 | ||
59 | %package static | |
60 | Summary: Static libcap-ng library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka libcap-ng | |
62 | License: LGPL v2.1+ | |
63 | Group: Development/Libraries | |
4780db2a | 64 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
9a73f910 JB |
65 | |
66 | %description static | |
67 | Static libcap-ng library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Statyczna biblioteka libcap-ng. | |
71 | ||
72 | %package utils | |
73 | Summary: Utilities for analysing and setting file capabilities | |
74 | Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików | |
75 | License: GPL v2+ | |
76 | Group: Applications/System | |
4780db2a | 77 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9a73f910 JB |
78 | |
79 | %description utils | |
80 | This package contains applications to analyse the POSIX capabilities | |
81 | of all the program running on a system. It also lets you set the file | |
82 | system based capabilities. | |
83 | ||
d92d486f | 84 | %description utils -l pl.UTF-8 |
9a73f910 JB |
85 | Ten pakiet zawiera aplikacje do analizy POSIX-owych capabilities |
86 | wszystkich programów działających w systemie; pozwala także ustawiać | |
87 | capabilities w systemie plików. | |
88 | ||
89 | %package -n python-capng | |
f37d7666 JB |
90 | Summary: Python 2 interface to libcap-ng library |
91 | Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki libcap-ng | |
9a73f910 | 92 | Group: Libraries/Python |
4780db2a | 93 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9a73f910 JB |
94 | |
95 | %description -n python-capng | |
f37d7666 | 96 | Python 2 interface to libcap-ng library. |
9a73f910 JB |
97 | |
98 | %description -n python-capng -l pl.UTF-8 | |
f37d7666 JB |
99 | Interfejs Pythona 2 do biblioteki libcap-ng. |
100 | ||
101 | %package -n python3-capng | |
102 | Summary: Python 3 interface to libcap-ng library | |
103 | Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki libcap-ng | |
104 | Group: Libraries/Python | |
4780db2a | 105 | Requires: %{name} = %{epoch}:%{version}-%{release} |
f37d7666 JB |
106 | |
107 | %description -n python3-capng | |
108 | Python 3 interface to libcap-ng library. | |
109 | ||
110 | %description -n python3-capng -l pl.UTF-8 | |
111 | Interfejs 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 | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %{__make} install \ | |
134 | DESTDIR=$RPM_BUILD_ROOT | |
135 | ||
136 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d13b41aa | 137 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib} |
667d74fd | 138 | ln -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 | |
151 | rm -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 |