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