]>
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 | |
7b23f2d1 | 14 | Version: 0.7.8 |
19313a42 | 15 | Release: 5 |
a4f6b392 | 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 | |
7b23f2d1 | 20 | # Source0-md5: 0dece96644bd798020e170fbf7663802 |
e64f4261 | 21 | Patch0: vserver.patch |
9a73f910 JB |
22 | URL: http://people.redhat.com/sgrubb/libcap-ng/ |
23 | BuildRequires: attr-devel | |
131c6123 | 24 | BuildRequires: automake |
e64f4261 | 25 | BuildRequires: 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 |
28 | BuildRequires: rpm-pythonprov |
29 | BuildRequires: rpmbuild(macros) >= 1.219 | |
a97a426a | 30 | %{?with_python:BuildRequires: swig-python} |
9a73f910 JB |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
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. | |
37 | ||
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. | |
42 | ||
43 | %package devel | |
44 | Summary: Header files for libcap-ng library | |
45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng | |
46 | License: LGPL v2.1+ | |
47 | Group: Development/Libraries | |
48 | Requires: %{name} = %{version}-%{release} | |
49 | Requires: linux-libc-headers >= 7:2.6.26 | |
50 | ||
51 | %description devel | |
52 | Header files for libcap-ng library. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
55 | Pliki nagłówkowe biblioteki libcap-ng. | |
56 | ||
57 | %package static | |
58 | Summary: Static libcap-ng library | |
59 | Summary(pl.UTF-8): Statyczna biblioteka libcap-ng | |
60 | License: LGPL v2.1+ | |
61 | Group: Development/Libraries | |
19313a42 | 62 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
9a73f910 JB |
63 | |
64 | %description static | |
65 | Static libcap-ng library. | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Statyczna biblioteka libcap-ng. | |
69 | ||
70 | %package utils | |
71 | Summary: Utilities for analysing and setting file capabilities | |
72 | Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików | |
73 | License: GPL v2+ | |
74 | Group: Applications/System | |
19313a42 | 75 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9a73f910 JB |
76 | |
77 | %description utils | |
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. | |
81 | ||
d92d486f | 82 | %description utils -l pl.UTF-8 |
9a73f910 JB |
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. | |
86 | ||
87 | %package -n python-capng | |
f37d7666 JB |
88 | Summary: Python 2 interface to libcap-ng library |
89 | Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki libcap-ng | |
9a73f910 | 90 | Group: Libraries/Python |
19313a42 | 91 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9a73f910 JB |
92 | |
93 | %description -n python-capng | |
f37d7666 | 94 | Python 2 interface to libcap-ng library. |
9a73f910 JB |
95 | |
96 | %description -n python-capng -l pl.UTF-8 | |
f37d7666 JB |
97 | Interfejs Pythona 2 do biblioteki libcap-ng. |
98 | ||
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 | |
19313a42 | 103 | Requires: %{name} = %{epoch}:%{version}-%{release} |
f37d7666 JB |
104 | |
105 | %description -n python3-capng | |
106 | Python 3 interface to libcap-ng library. | |
107 | ||
108 | %description -n python3-capng -l pl.UTF-8 | |
109 | Interfejs 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 | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %{__make} install \ | |
128 | DESTDIR=$RPM_BUILD_ROOT | |
129 | ||
130 | install -d $RPM_BUILD_ROOT/%{_lib} | |
131 | mv $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib} | |
667d74fd | 132 | ln -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 | |
145 | rm -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 |