]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with python3 # use Python 3 instead of Python 2 | |
4 | ||
5 | Summary: AppArmor userlevel utilities that are useful in creating AppArmor profiles | |
6 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika przydatne do tworzenia profili AppArmor | |
7 | Name: apparmor-utils | |
8 | Version: 2.13.4 | |
9 | Release: 1 | |
10 | Epoch: 1 | |
11 | License: GPL v2 | |
12 | Group: Base | |
13 | Source0: http://launchpad.net/apparmor/2.13/%{version}/+download/apparmor-%{version}.tar.gz | |
14 | # Source0-md5: a50b793a3362551f07733be3df9c328f | |
15 | Patch0: %{name}-pysetup.patch | |
16 | URL: http://wiki.apparmor.net/ | |
17 | BuildRequires: gettext-tools | |
18 | %if %{with python3} | |
19 | BuildRequires: python3 | |
20 | Requires: python3-LibAppArmor | |
21 | %else | |
22 | BuildRequires: python | |
23 | Requires: python-LibAppArmor | |
24 | %endif | |
25 | Requires: apparmor-binutils >= %{version} | |
26 | Requires: perl-LibAppArmor | |
27 | Provides: subdomain-utils | |
28 | Obsoletes: subdomain-utils | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %define _vimdatadir %{_datadir}/vim/vimfiles | |
33 | ||
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 | ||
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. | |
43 | ||
44 | %package -n vim-syntax-apparmor | |
45 | Summary: AppArmor files support for Vim | |
46 | Summary(pl.UTF-8): Obsługa plików AppArmor dla Vima | |
47 | Group: Applications/Editors/Vim | |
48 | # for _vimdatadir existence | |
49 | Requires: vim-rt >= 4:6.3.058-3 | |
50 | ||
51 | %description -n vim-syntax-apparmor | |
52 | AppArmor files support for Vim. | |
53 | ||
54 | %description -n vim-syntax-apparmor -l pl.UTF-8 | |
55 | Obsługa plików AppArmor dla Vima. | |
56 | ||
57 | %prep | |
58 | %setup -q -n apparmor-%{version} | |
59 | %patch0 -p1 | |
60 | ||
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 | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %{__make} -C utils install \ | |
71 | %if %{with python3} | |
72 | PYTHON="%{__python3}" \ | |
73 | PYSETUP_INSTALL_ARGS="--install-purelib=%{py3_sitescriptdir} --optimize=2" \ | |
74 | %else | |
75 | PYTHON="%{__python}" \ | |
76 | PYSETUP_INSTALL_ARGS="--install-purelib=%{py_sitescriptdir} --optimize=2" \ | |
77 | %endif | |
78 | DESTDIR=$RPM_BUILD_ROOT \ | |
79 | BINDIR=$RPM_BUILD_ROOT%{_sbindir} \ | |
80 | VIM_INSTALL_PATH=$RPM_BUILD_ROOT%{_vimdatadir}/syntax | |
81 | ||
82 | install -d $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect | |
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 | ||
87 | %if %{without python3} | |
88 | %py_postclean | |
89 | %endif | |
90 | ||
91 | %find_lang %{name} | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %files -f %{name}.lang | |
97 | %defattr(644,root,root,755) | |
98 | %dir %{_sysconfdir}/apparmor | |
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 | |
102 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/severity.db | |
103 | %attr(755,root,root) %{_bindir}/aa-easyprof | |
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 | |
118 | %attr(755,root,root) %{_sbindir}/apparmor_status | |
119 | %dir %{_datadir}/apparmor | |
120 | %{_datadir}/apparmor/easyprof | |
121 | %if %{with python3} | |
122 | %{py3_sitescriptdir}/apparmor | |
123 | %{py3_sitescriptdir}/apparmor-%{version}-py*.egg-info | |
124 | %else | |
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 | |
130 | %endif | |
131 | %{_mandir}/man5/logprof.conf.5* | |
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* | |
147 | %{_mandir}/man8/apparmor_status.8* | |
148 | ||
149 | %files -n vim-syntax-apparmor | |
150 | %defattr(644,root,root,755) | |
151 | %{_vimdatadir}/ftdetect/apparmor.vim | |
152 | %{_vimdatadir}/syntax/apparmor.vim | |
153 | %{_mandir}/man5/apparmor.vim.5* |