]>
Commit | Line | Data |
---|---|---|
b5654a23 | 1 | # |
7b00bfe4 | 2 | # Conditional build: |
b5654a23 JB |
3 | %bcond_without ruby # build without Ruby bindings |
4 | %bcond_with python3 # build for Python3 | |
7b00bfe4 | 5 | |
4bed3c28 | 6 | %include /usr/lib/rpm/macros.perl |
b29a015c | 7 | Summary: Library to provide key AppArmor symbols |
07336d41 | 8 | Summary(pl.UTF-8): Biblioteka udostępniająca kluczowe symbole AppArmor |
b29a015c | 9 | Name: libapparmor |
90ed505a AM |
10 | Version: 2.10.1 |
11 | Release: 1 | |
cd5c18e1 | 12 | Epoch: 1 |
ab3177e2 | 13 | License: LGPL v2.1 |
b29a015c | 14 | Group: Libraries |
b5654a23 | 15 | Source0: http://launchpad.net/apparmor/2.10/%{version}/+download/apparmor-%{version}.tar.gz |
90ed505a | 16 | # Source0-md5: c9d82e04d699b0530b12dec15136027d |
7b481572 | 17 | Patch0: %{name}-private.patch |
b15247c4 | 18 | URL: http://wiki.apparmor.net/ |
b5654a23 | 19 | BuildRequires: autoconf >= 2.50 |
ab3177e2 | 20 | BuildRequires: automake >= 1.4 |
4da076f4 AM |
21 | BuildRequires: bison |
22 | BuildRequires: flex | |
b5724fe0 | 23 | BuildRequires: libtool |
8f978932 | 24 | BuildRequires: perl-devel |
02c46005 | 25 | BuildRequires: perl-tools-pod |
b5654a23 | 26 | BuildRequires: pkgconfig |
b07d40ed JK |
27 | %if %{with python3} |
28 | BuildRequires: python3-devel | |
29 | %else | |
8f978932 | 30 | BuildRequires: python-devel |
b07d40ed | 31 | %endif |
ab3177e2 | 32 | BuildRequires: rpmbuild(macros) >= 1.272 |
4bed3c28 AM |
33 | BuildRequires: rpm-perlprov |
34 | BuildRequires: rpm-pythonprov | |
7b00bfe4 | 35 | %{?with_ruby:BuildRequires: ruby-devel} |
6094cfac | 36 | BuildRequires: swig-perl |
37 | BuildRequires: swig-python | |
7b00bfe4 | 38 | %{?with_ruby:BuildRequires: swig-ruby} |
b29a015c | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | This package provides the libapparmor library, which contains the | |
43 | change_hat(2) symbol, used for sub-process confinement by AppArmor. | |
44 | Applications that wish to make use of change_hat(2) need to link | |
45 | against this library. This package is part of a suite of tools that | |
46 | used to be named SubDomain. | |
47 | ||
f037ca82 JR |
48 | %description -l pl.UTF-8 |
49 | Ten pakiet udostępnia bibliotekę libapparmor, zawierającą symbol | |
50 | change_hat(2), używany do więzienia podprocesów przez AppArmor. | |
51 | Aplikacje chcące używać change_hat(2) muszą być linkowane z tą | |
52 | biblioteką. Ten pakiet jest częścią zestawu narzędzi nazywanego | |
868a657b JB |
53 | SubDomain. |
54 | ||
b29a015c | 55 | %package devel |
56 | Summary: Header files for libapparmor library | |
07336d41 | 57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libapparmor |
b29a015c | 58 | Group: Development/Libraries |
7af628a3 | 59 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b29a015c | 60 | |
61 | %description devel | |
62 | This is the package containing the header files for libapparmor | |
63 | library. | |
64 | ||
f037ca82 JR |
65 | %description devel -l pl.UTF-8 |
66 | Ten pakiet zawiera pliki nagłówkowe biblioteki libapparmor. | |
b29a015c | 67 | |
68 | %package static | |
69 | Summary: Static libapparmor library | |
07336d41 | 70 | Summary(pl.UTF-8): Statyczna biblioteka libapparmor |
b29a015c | 71 | Group: Development/Libraries |
7af628a3 | 72 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
b29a015c | 73 | |
74 | %description static | |
75 | Static libapparmor library. | |
76 | ||
f037ca82 | 77 | %description static -l pl.UTF-8 |
b29a015c | 78 | Statyczna biblioteka libapparmor. |
79 | ||
3d0dfbc8 | 80 | %package -n perl-LibAppArmor |
ab3177e2 JB |
81 | Summary: AppArmor Perl bindings |
82 | Summary(pl.UTF-8): Dowiązania do AppArmor dla Perla | |
83 | Summary(pt_BR.UTF-8): Módulos Perl para acessar os recursos do AppArmor | |
84 | Group: Development/Languages/Perl | |
3d0dfbc8 | 85 | Obsoletes: perl-apparmor |
ab3177e2 JB |
86 | Requires: %{name} = %{epoch}:%{version}-%{release} |
87 | ||
3d0dfbc8 | 88 | %description -n perl-LibAppArmor |
ab3177e2 JB |
89 | AppArmor Perl bindings. |
90 | ||
3d0dfbc8 | 91 | %description -n perl-LibAppArmor -l pl.UTF-8 |
ab3177e2 JB |
92 | Dowiązania do AppArmor dla Perla. |
93 | ||
3d0dfbc8 | 94 | %description -n perl-LibAppArmor -l pt_BR.UTF-8 |
ab3177e2 JB |
95 | Módulos Perl para acessar os recursos do AppArmor. |
96 | ||
1f3c1902 | 97 | %package -n python-LibAppArmor |
c2413d27 AM |
98 | Summary: AppArmor Python bindings |
99 | Summary(pl.UTF-8): Dowiązania do AppArmor dla Pythona | |
100 | Summary(pt_BR.UTF-8): Módulos Python para acessar os recursos do AppArmor | |
101 | Group: Development/Languages/Python | |
102 | %pyrequires_eq python | |
1f3c1902 | 103 | Obsoletes: python-apparmor |
c2413d27 AM |
104 | Requires: %{name} = %{epoch}:%{version}-%{release} |
105 | ||
1f3c1902 | 106 | %description -n python-LibAppArmor |
c2413d27 AM |
107 | AppArmor Python bindings. |
108 | ||
1f3c1902 | 109 | %description -n python-LibAppArmor -l pl.UTF-8 |
c2413d27 AM |
110 | Dowiązania do AppArmor dla Pythona. |
111 | ||
1f3c1902 | 112 | %description -n python-LibAppArmor -l pt_BR.UTF-8 |
c2413d27 AM |
113 | Módulos Python para acessar os recursos do AppArmor. |
114 | ||
b07d40ed JK |
115 | %package -n python3-LibAppArmor |
116 | Summary: AppArmor Python bindings | |
117 | Summary(pl.UTF-8): Dowiązania do AppArmor dla Pythona | |
118 | Summary(pt_BR.UTF-8): Módulos Python para acessar os recursos do AppArmor | |
119 | Group: Development/Languages/Python | |
e59fce14 | 120 | %pyrequires_eq python3 |
b07d40ed JK |
121 | Obsoletes: python3-apparmor |
122 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
123 | ||
124 | %description -n python3-LibAppArmor | |
125 | AppArmor Python bindings. | |
126 | ||
127 | %description -n python3-LibAppArmor -l pl.UTF-8 | |
128 | Dowiązania do AppArmor dla Pythona. | |
129 | ||
130 | %description -n python3-LibAppArmor -l pt_BR.UTF-8 | |
131 | Módulos Python para acessar os recursos do AppArmor. | |
132 | ||
3d0dfbc8 | 133 | %package -n ruby-LibAppArmor |
ab3177e2 JB |
134 | Summary: AppArmor Ruby bindings |
135 | Summary(pl.UTF-8): Dowiązania do AppArmor dla języka Ruby | |
136 | Group: Development/Languages | |
3d0dfbc8 | 137 | Obsoletes: ruby-apparmor |
c2413d27 | 138 | Requires: %{name} = %{epoch}:%{version}-%{release} |
ab3177e2 | 139 | %{?ruby_mod_ver_requires_eq} |
c2413d27 | 140 | |
3d0dfbc8 | 141 | %description -n ruby-LibAppArmor |
ab3177e2 | 142 | AppArmor Ruby bindings. |
c2413d27 | 143 | |
3d0dfbc8 | 144 | %description -n ruby-LibAppArmor -l pl.UTF-8 |
ab3177e2 | 145 | Dowiązania do AppArmor dla języka Ruby. |
c2413d27 | 146 | |
b29a015c | 147 | %prep |
a6443eef | 148 | %setup -q -n apparmor-%{version} |
7b481572 | 149 | %patch0 -p1 |
b29a015c | 150 | |
151 | %build | |
8f978932 | 152 | cd libraries/libapparmor |
b5724fe0 AM |
153 | %{__libtoolize} |
154 | %{__aclocal} | |
155 | %{__autoconf} | |
156 | %{__automake} | |
8f978932 AM |
157 | |
158 | %configure \ | |
b07d40ed JK |
159 | %if %{with python3} |
160 | PYTHON="%{__python3}" \ | |
161 | %endif | |
7b00bfe4 | 162 | %{?with_ruby:--with-ruby} \ |
8f978932 | 163 | --with-python \ |
7b00bfe4 | 164 | --with-perl |
8f978932 AM |
165 | |
166 | %{__make} -j1 \ | |
b29a015c | 167 | CC="%{__cc}" \ |
5d8463c0 | 168 | CFLAGS="%{rpmcflags} -fPIC" |
b29a015c | 169 | |
170 | %install | |
171 | rm -rf $RPM_BUILD_ROOT | |
b5724fe0 | 172 | |
8e28e952 | 173 | %{__make} -j1 -C libraries/libapparmor install \ |
90afa0e5 | 174 | RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \ |
b5724fe0 | 175 | DESTDIR=$RPM_BUILD_ROOT |
b29a015c | 176 | |
ab3177e2 JB |
177 | %py_postclean |
178 | ||
b29a015c | 179 | %clean |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
182 | %post -p /sbin/ldconfig | |
183 | %postun -p /sbin/ldconfig | |
184 | ||
185 | %files | |
186 | %defattr(644,root,root,755) | |
ab3177e2 JB |
187 | %attr(755,root,root) %{_libdir}/libapparmor.so.*.*.* |
188 | %attr(755,root,root) %ghost %{_libdir}/libapparmor.so.1 | |
b29a015c | 189 | |
190 | %files devel | |
191 | %defattr(644,root,root,755) | |
ab3177e2 | 192 | %attr(755,root,root) %{_libdir}/libapparmor.so |
ab3177e2 | 193 | %{_libdir}/libapparmor.la |
b5724fe0 | 194 | %{_includedir}/aalogparse |
ab3177e2 | 195 | %{_includedir}/sys/apparmor.h |
b5654a23 | 196 | %{_includedir}/sys/apparmor_private.h |
27234345 | 197 | %{_pkgconfigdir}/libapparmor.pc |
ab3177e2 JB |
198 | %{_mandir}/man2/aa_change_hat.2* |
199 | %{_mandir}/man2/aa_change_profile.2* | |
89ed002a AM |
200 | %{_mandir}/man2/aa_find_mountpoint.2* |
201 | %{_mandir}/man2/aa_getcon.2* | |
b5654a23 JB |
202 | %{_mandir}/man2/aa_query_label.2* |
203 | %{_mandir}/man3/aa_features.3* | |
204 | %{_mandir}/man3/aa_kernel_interface.3* | |
205 | %{_mandir}/man3/aa_policy_cache.3* | |
206 | %{_mandir}/man3/aa_splitcon.3* | |
b29a015c | 207 | |
208 | %files static | |
209 | %defattr(644,root,root,755) | |
ab3177e2 | 210 | %{_libdir}/libapparmor.a |
ab3177e2 | 211 | |
3d0dfbc8 | 212 | %files -n perl-LibAppArmor |
ab3177e2 JB |
213 | %defattr(644,root,root,755) |
214 | %{perl_vendorarch}/LibAppArmor.pm | |
215 | %dir %{perl_vendorarch}/auto/LibAppArmor | |
ab3177e2 | 216 | %attr(755,root,root) %{perl_vendorarch}/auto/LibAppArmor/LibAppArmor.so |
c2413d27 | 217 | |
b07d40ed JK |
218 | %if %{with python3} |
219 | %files -n python3-LibAppArmor | |
220 | %defattr(644,root,root,755) | |
221 | %dir %{py3_sitedir}/LibAppArmor | |
222 | %attr(755,root,root) %{py3_sitedir}/LibAppArmor/_LibAppArmor.*.so | |
223 | %{py3_sitedir}/LibAppArmor/__pycache__ | |
224 | %{py3_sitedir}/LibAppArmor/__init__.py | |
225 | %{py3_sitedir}/LibAppArmor-*.egg-info | |
226 | %else | |
1f3c1902 | 227 | %files -n python-LibAppArmor |
c2413d27 | 228 | %defattr(644,root,root,755) |
a6443eef | 229 | %dir %{py_sitedir}/LibAppArmor |
ab3177e2 JB |
230 | %attr(755,root,root) %{py_sitedir}/LibAppArmor/_LibAppArmor.so |
231 | %{py_sitedir}/LibAppArmor/__init__.py[co] | |
232 | %{py_sitedir}/LibAppArmor-*.egg-info | |
b07d40ed | 233 | %endif |
c2413d27 | 234 | |
7b00bfe4 | 235 | %if %{with ruby} |
3d0dfbc8 | 236 | %files -n ruby-LibAppArmor |
c2413d27 | 237 | %defattr(644,root,root,755) |
90afa0e5 | 238 | %attr(755,root,root) %{ruby_vendorarchdir}/LibAppArmor.so |
7b00bfe4 | 239 | %endif |