]> git.pld-linux.org Git - packages/libcap-ng.git/blob - libcap-ng.spec
2e77fdef3415f7f3ed011b8005c42bd9293c6994
[packages/libcap-ng.git] / libcap-ng.spec
1 #
2 # Conditional build:
3 %bcond_without  python          # (any) Python bindings
4 %bcond_without  python2         # CPython 2 bindings
5 %bcond_without  python3         # CPython 3 bindings
6 #
7 %if %{without python}
8 %undefine       with_python2
9 %undefine       with_python3
10 %endif
11 Summary:        Next Generation of POSIX capabilities library
12 Summary(pl.UTF-8):      Biblioteka POSIX capabilities nowej generacji
13 Name:           libcap-ng
14 Version:        0.8.2
15 Release:        4
16 Epoch:          1
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
20 # Source0-md5:  faf1ef766cf068ad1aba4008ced665f7
21 Patch0:         vserver.patch
22 Patch1:         unloadable.patch
23 URL:            http://people.redhat.com/sgrubb/libcap-ng/
24 BuildRequires:  attr-devel
25 BuildRequires:  autoconf >= 2.12
26 BuildRequires:  automake
27 BuildRequires:  linux-libc-headers >= 7:2.6.33.1
28 %{?with_python2:BuildRequires:  python-devel >= 2}
29 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.219
32 %{?with_python:BuildRequires:   swig-python}
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
50 Requires:       %{name} = %{epoch}:%{version}-%{release}
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
64 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
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
77 Requires:       %{name} = %{epoch}:%{version}-%{release}
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
84 %description utils -l pl.UTF-8
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
90 Summary:        Python 2 interface to libcap-ng library
91 Summary(pl.UTF-8):      Interfejs Pythona 2 do biblioteki libcap-ng
92 Group:          Libraries/Python
93 Requires:       %{name} = %{epoch}:%{version}-%{release}
94
95 %description -n python-capng
96 Python 2 interface to libcap-ng library.
97
98 %description -n python-capng -l pl.UTF-8
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
105 Requires:       %{name} = %{epoch}:%{version}-%{release}
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.
112
113 %prep
114 %setup -q
115 %patch0 -p1
116 %patch1 -p1
117
118 # force regeneration after captab.h change in vserver patch
119 %{__rm} bindings/{python,python3}/capng.py
120
121 %build
122 %{__aclocal}
123 %{__autoconf}
124 %{__automake}
125 %configure \
126         %{!?with_python2:--without-python} \
127         %{!?with_python3:--without-python3}
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}
137 %{__mv} $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so.* $RPM_BUILD_ROOT/%{_lib}
138 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcap-ng.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcap-ng.so
139
140 %if %{with python2}
141 %py_postclean
142 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_capng.la
143 %endif
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
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 %attr(755,root,root) %{_libdir}/libdrop_ambient.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libdrop_ambient.so.0
163
164 %files devel
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/libcap-ng.so
167 %{_libdir}/libcap-ng.la
168 %attr(755,root,root) %{_libdir}/libdrop_ambient.so
169 %{_libdir}/libdrop_ambient.la
170 %{_includedir}/cap-ng.h
171 %{_pkgconfigdir}/libcap-ng.pc
172 %{_aclocaldir}/cap-ng.m4
173 %{_mandir}/man3/capng_*.3*
174 %{_mandir}/man7/libdrop_ambient.7*
175
176 %files static
177 %defattr(644,root,root,755)
178 %{_libdir}/libcap-ng.a
179 %{_libdir}/libdrop_ambient.a
180
181 %files utils
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{_bindir}/captest
184 %attr(755,root,root) %{_bindir}/filecap
185 %attr(755,root,root) %{_bindir}/netcap
186 %attr(755,root,root) %{_bindir}/pscap
187 %{_mandir}/man8/captest.8*
188 %{_mandir}/man8/filecap.8*
189 %{_mandir}/man8/netcap.8*
190 %{_mandir}/man8/pscap.8*
191
192 %if %{with python2}
193 %files -n python-capng
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{py_sitedir}/_capng.so
196 %{py_sitedir}/capng.py[co]
197 %endif
198
199 %if %{with python3}
200 %files -n python3-capng
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{py3_sitedir}/_capng.so
203 %{py3_sitedir}/capng.py
204 %{py3_sitedir}/__pycache__/capng.cpython-*.py[co]
205 %endif
This page took 0.054673 seconds and 2 git commands to generate.