]>
Commit | Line | Data |
---|---|---|
a97a426a JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python # build without python bindings | |
4 | # | |
9a73f910 JB |
5 | Summary: Next Generation of POSIX capabilities library |
6 | Summary(pl.UTF-8): Biblioteka POSIX capabilities nowej generacji | |
7 | Name: libcap-ng | |
dc886141 | 8 | Version: 0.7.1 |
7a591dee | 9 | Release: 1 |
9a73f910 JB |
10 | License: LGPL v2.1+ (library), GPL v2+ (utilities) |
11 | Group: Libraries | |
12 | Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz | |
dc886141 | 13 | # Source0-md5: de15a38ebd7c48d782c9e370f50cf5ba |
e64f4261 | 14 | Patch0: vserver.patch |
9a73f910 JB |
15 | URL: http://people.redhat.com/sgrubb/libcap-ng/ |
16 | BuildRequires: attr-devel | |
131c6123 | 17 | BuildRequires: automake |
e64f4261 | 18 | BuildRequires: linux-libc-headers >= 7:2.6.33.1 |
9a73f910 JB |
19 | BuildRequires: python-devel |
20 | BuildRequires: rpm-pythonprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.219 | |
a97a426a | 22 | %{?with_python:BuildRequires: swig-python} |
9a73f910 JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | The libcap-ng library should make programming with POSIX capabilities | |
27 | easier. The library has some utilities to help you analyse a system | |
28 | for apps that may have too much privileges. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | Biblioteka libcap-ng powinna uczynić programowanie POSIX-owych | |
32 | capabilities łatwiejszym. Zawiera narzędzia pomagające w analizie | |
33 | systemu pod kątem aplikacji posiadających zbyt duże uprawnienia. | |
34 | ||
35 | %package devel | |
36 | Summary: Header files for libcap-ng library | |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcap-ng | |
38 | License: LGPL v2.1+ | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: linux-libc-headers >= 7:2.6.26 | |
42 | ||
43 | %description devel | |
44 | Header files for libcap-ng library. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe biblioteki libcap-ng. | |
48 | ||
49 | %package static | |
50 | Summary: Static libcap-ng library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka libcap-ng | |
52 | License: LGPL v2.1+ | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static libcap-ng library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka libcap-ng. | |
61 | ||
62 | %package utils | |
63 | Summary: Utilities for analysing and setting file capabilities | |
64 | Summary(pl.UTF-8): Narzędzia do analizy i ustawiania capabilities dla plików | |
65 | License: GPL v2+ | |
66 | Group: Applications/System | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description utils | |
70 | This package contains applications to analyse the POSIX capabilities | |
71 | of all the program running on a system. It also lets you set the file | |
72 | system based capabilities. | |
73 | ||
d92d486f | 74 | %description utils -l pl.UTF-8 |
9a73f910 JB |
75 | Ten pakiet zawiera aplikacje do analizy POSIX-owych capabilities |
76 | wszystkich programów działających w systemie; pozwala także ustawiać | |
77 | capabilities w systemie plików. | |
78 | ||
79 | %package -n python-capng | |
80 | Summary: Python interface to libcap-ng library | |
81 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libcap-ng | |
82 | Group: Libraries/Python | |
83 | Requires: %{name} = %{version}-%{release} | |
84 | %pyrequires_eq python-libs | |
85 | ||
86 | %description -n python-capng | |
87 | Python interface to libcap-ng library. | |
88 | ||
89 | %description -n python-capng -l pl.UTF-8 | |
90 | Pythonowy interfejs do biblioteki libcap-ng. | |
91 | ||
92 | %prep | |
93 | %setup -q | |
e64f4261 | 94 | %patch0 -p1 |
9a73f910 JB |
95 | |
96 | %build | |
97 | %configure | |
98 | %{__make} | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %{__make} install \ | |
104 | DESTDIR=$RPM_BUILD_ROOT | |
105 | ||
106 | install -d $RPM_BUILD_ROOT/%{_lib} | |
107 | mv $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib} | |
667d74fd | 108 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcap-ng.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so |
9a73f910 | 109 | |
a97a426a | 110 | %if %{with python} |
9a73f910 | 111 | %py_postclean |
7a591dee | 112 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_capng.la |
a97a426a | 113 | %endif |
9a73f910 JB |
114 | |
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %post -p /sbin/ldconfig | |
119 | %postun -p /sbin/ldconfig | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %doc AUTHORS ChangeLog README | |
124 | %attr(755,root,root) /%{_lib}/libcap-ng.so.*.*.* | |
125 | %attr(755,root,root) %ghost /%{_lib}/libcap-ng.so.0 | |
126 | ||
127 | %files devel | |
128 | %defattr(644,root,root,755) | |
129 | %attr(755,root,root) %{_libdir}/libcap-ng.so | |
130 | %{_libdir}/libcap-ng.la | |
131 | %{_includedir}/cap-ng.h | |
132 | %{_pkgconfigdir}/libcap-ng.pc | |
133 | %{_aclocaldir}/cap-ng.m4 | |
134 | %{_mandir}/man3/capng_*.3* | |
135 | ||
136 | %files static | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/libcap-ng.a | |
139 | ||
140 | %files utils | |
141 | %defattr(644,root,root,755) | |
142 | %attr(755,root,root) %{_bindir}/captest | |
143 | %attr(755,root,root) %{_bindir}/filecap | |
144 | %attr(755,root,root) %{_bindir}/netcap | |
145 | %attr(755,root,root) %{_bindir}/pscap | |
146 | %{_mandir}/man8/captest.8* | |
147 | %{_mandir}/man8/filecap.8* | |
148 | %{_mandir}/man8/netcap.8* | |
149 | %{_mandir}/man8/pscap.8* | |
150 | ||
a97a426a | 151 | %if %{with python} |
9a73f910 JB |
152 | %files -n python-capng |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{py_sitedir}/_capng.so | |
155 | %{py_sitedir}/capng.py[co] | |
a97a426a | 156 | %endif |