]>
Commit | Line | Data |
---|---|---|
9af55ceb JB |
1 | # |
2 | # Conditional build: | |
02e033b3 JK |
3 | %bcond_with python3 # use Python 3 instead of Python 2 |
4 | ||
f647fde8 | 5 | Summary: AppArmor userlevel utilities that are useful in creating AppArmor profiles |
9c260647 | 6 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika przydatne do tworzenia profili AppArmor |
f647fde8 | 7 | Name: apparmor-utils |
06597f8c JB |
8 | Version: 2.13.4 |
9 | Release: 1 | |
08a56991 | 10 | Epoch: 1 |
d7e0a3f8 | 11 | License: GPL v2 |
f647fde8 | 12 | Group: Base |
722aaebe | 13 | Source0: http://launchpad.net/apparmor/2.13/%{version}/+download/apparmor-%{version}.tar.gz |
06597f8c | 14 | # Source0-md5: a50b793a3362551f07733be3df9c328f |
9af55ceb | 15 | Patch0: %{name}-pysetup.patch |
b09707b2 | 16 | URL: http://wiki.apparmor.net/ |
a91a385f | 17 | BuildRequires: gettext-tools |
02e033b3 JK |
18 | %if %{with python3} |
19 | BuildRequires: python3 | |
20 | Requires: python3-LibAppArmor | |
21 | %else | |
e7c16871 | 22 | BuildRequires: python |
f317d40c | 23 | Requires: python-LibAppArmor |
02e033b3 | 24 | %endif |
d08bea42 | 25 | Requires: apparmor-binutils >= %{version} |
a479cf68 | 26 | Requires: perl-LibAppArmor |
f647fde8 | 27 | Provides: subdomain-utils |
28 | Obsoletes: subdomain-utils | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
f391d7c7 | 32 | %define _vimdatadir %{_datadir}/vim/vimfiles |
0800d6d8 | 33 | |
f647fde8 | 34 | %description |
35 | This provides some useful programs to help create and manage AppArmor | |
36 | profiles. This package is part of a suite of tools that used to be | |
37 | named SubDomain. | |
38 | ||
60482931 JR |
39 | %description -l pl.UTF-8 |
40 | Ten pakiet dostarcza kilka przydatnych programów pomocnych przy | |
41 | tworzeniu i zarządzaniu profilami AppArmor. Ten pakiet jest częścią | |
42 | zestawu narzędzi zwanych SubDomain. | |
54485e9f | 43 | |
9f92c7bf | 44 | %package -n vim-syntax-apparmor |
45 | Summary: AppArmor files support for Vim | |
9c260647 | 46 | Summary(pl.UTF-8): Obsługa plików AppArmor dla Vima |
9f92c7bf | 47 | Group: Applications/Editors/Vim |
c93eb1a4 ER |
48 | # for _vimdatadir existence |
49 | Requires: vim-rt >= 4:6.3.058-3 | |
9f92c7bf | 50 | |
51 | %description -n vim-syntax-apparmor | |
52 | AppArmor files support for Vim. | |
53 | ||
60482931 JR |
54 | %description -n vim-syntax-apparmor -l pl.UTF-8 |
55 | Obsługa plików AppArmor dla Vima. | |
9f92c7bf | 56 | |
f647fde8 | 57 | %prep |
03684442 | 58 | %setup -q -n apparmor-%{version} |
9af55ceb | 59 | %patch0 -p1 |
f647fde8 | 60 | |
02e033b3 JK |
61 | %if %{with python3} |
62 | %{__sed} -i -e '1s, */usr/bin/env python,%{__python3},' utils/aa-* | |
63 | %else | |
64 | %{__sed} -i -e '1s, */usr/bin/env python,%{__python},' utils/aa-* | |
65 | %endif | |
e7c16871 | 66 | |
f647fde8 | 67 | %install |
68 | rm -rf $RPM_BUILD_ROOT | |
5b769334 | 69 | |
3a214025 | 70 | %{__make} -C utils install \ |
02e033b3 JK |
71 | %if %{with python3} |
72 | PYTHON="%{__python3}" \ | |
3a214025 | 73 | PYSETUP_INSTALL_ARGS="--install-purelib=%{py3_sitescriptdir} --optimize=2" \ |
02e033b3 JK |
74 | %else |
75 | PYTHON="%{__python}" \ | |
3a214025 | 76 | PYSETUP_INSTALL_ARGS="--install-purelib=%{py_sitescriptdir} --optimize=2" \ |
02e033b3 | 77 | %endif |
f647fde8 | 78 | DESTDIR=$RPM_BUILD_ROOT \ |
79 | BINDIR=$RPM_BUILD_ROOT%{_sbindir} \ | |
e7c16871 | 80 | VIM_INSTALL_PATH=$RPM_BUILD_ROOT%{_vimdatadir}/syntax |
f647fde8 | 81 | |
e7c16871 | 82 | install -d $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect |
9f92c7bf | 83 | cat > $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/apparmor.vim <<-EOF |
84 | au BufNewFile,BufRead /etc/apparmor.d/*,/etc/apparmor/profiles/* set filetype=apparmor | |
85 | EOF | |
86 | ||
3a214025 | 87 | %if %{without python3} |
e7c16871 | 88 | %py_postclean |
02e033b3 | 89 | %endif |
e7c16871 | 90 | |
5b769334 AM |
91 | %find_lang %{name} |
92 | ||
f647fde8 | 93 | %clean |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %files -f %{name}.lang | |
97 | %defattr(644,root,root,755) | |
98 | %dir %{_sysconfdir}/apparmor | |
e7c16871 JB |
99 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/easyprof.conf |
100 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/logprof.conf | |
101 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/notify.conf | |
46679d87 | 102 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/severity.db |
e7c16871 | 103 | %attr(755,root,root) %{_bindir}/aa-easyprof |
3a214025 JB |
104 | %attr(755,root,root) %{_sbindir}/aa-audit |
105 | %attr(755,root,root) %{_sbindir}/aa-autodep | |
106 | %attr(755,root,root) %{_sbindir}/aa-cleanprof | |
107 | %attr(755,root,root) %{_sbindir}/aa-complain | |
108 | %attr(755,root,root) %{_sbindir}/aa-decode | |
109 | %attr(755,root,root) %{_sbindir}/aa-disable | |
110 | %attr(755,root,root) %{_sbindir}/aa-enforce | |
111 | %attr(755,root,root) %{_sbindir}/aa-genprof | |
112 | %attr(755,root,root) %{_sbindir}/aa-logprof | |
113 | %attr(755,root,root) %{_sbindir}/aa-mergeprof | |
114 | %attr(755,root,root) %{_sbindir}/aa-notify | |
115 | %attr(755,root,root) %{_sbindir}/aa-remove-unknown | |
116 | %attr(755,root,root) %{_sbindir}/aa-status | |
117 | %attr(755,root,root) %{_sbindir}/aa-unconfined | |
46679d87 | 118 | %attr(755,root,root) %{_sbindir}/apparmor_status |
7c6f5cbc | 119 | %dir %{_datadir}/apparmor |
e7c16871 | 120 | %{_datadir}/apparmor/easyprof |
02e033b3 | 121 | %if %{with python3} |
9af55ceb JB |
122 | %{py3_sitescriptdir}/apparmor |
123 | %{py3_sitescriptdir}/apparmor-%{version}-py*.egg-info | |
02e033b3 | 124 | %else |
9af55ceb JB |
125 | %dir %{py_sitescriptdir}/apparmor |
126 | %{py_sitescriptdir}/apparmor/*.py[co] | |
127 | %dir %{py_sitescriptdir}/apparmor/rule | |
128 | %{py_sitescriptdir}/apparmor/rule/*.py[co] | |
129 | %{py_sitescriptdir}/apparmor-%{version}-py*.egg-info | |
02e033b3 | 130 | %endif |
46679d87 | 131 | %{_mandir}/man5/logprof.conf.5* |
3a214025 JB |
132 | %{_mandir}/man8/aa-audit.8* |
133 | %{_mandir}/man8/aa-autodep.8* | |
134 | %{_mandir}/man8/aa-cleanprof.8* | |
135 | %{_mandir}/man8/aa-complain.8* | |
136 | %{_mandir}/man8/aa-decode.8* | |
137 | %{_mandir}/man8/aa-disable.8* | |
138 | %{_mandir}/man8/aa-easyprof.8* | |
139 | %{_mandir}/man8/aa-enforce.8* | |
140 | %{_mandir}/man8/aa-genprof.8* | |
141 | %{_mandir}/man8/aa-logprof.8* | |
142 | %{_mandir}/man8/aa-mergeprof.8* | |
143 | %{_mandir}/man8/aa-notify.8* | |
144 | %{_mandir}/man8/aa-remove-unknown.8* | |
145 | %{_mandir}/man8/aa-status.8* | |
146 | %{_mandir}/man8/aa-unconfined.8* | |
46679d87 | 147 | %{_mandir}/man8/apparmor_status.8* |
9f92c7bf | 148 | |
149 | %files -n vim-syntax-apparmor | |
150 | %defattr(644,root,root,755) | |
46679d87 JB |
151 | %{_vimdatadir}/ftdetect/apparmor.vim |
152 | %{_vimdatadir}/syntax/apparmor.vim | |
f391d7c7 | 153 | %{_mandir}/man5/apparmor.vim.5* |