]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | %bcond_without tests | |
3 | ||
4 | Summary: AppArmor userlevel parser utility | |
5 | Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor | |
6 | Name: apparmor-parser | |
7 | Version: 2.5 | |
8 | Release: 1 | |
9 | Epoch: 1 | |
10 | License: GPL | |
11 | Group: Applications/System | |
12 | Source0: http://kernel.org/pub/linux/security/apparmor/AppArmor-%{version}/AppArmor-%{version}.tgz | |
13 | # Source0-md5: 4a747d1a1f85cb272d55b52c7e8a4a02 | |
14 | Source1: %{name}.init | |
15 | Patch0: %{name}-make.patch | |
16 | URL: http://apparmor.wiki.kernel.org/ | |
17 | BuildRequires: bison | |
18 | BuildRequires: flex | |
19 | BuildRequires: gettext-devel | |
20 | BuildRequires: libcap-devel | |
21 | BuildRequires: perl-Test-Harness | |
22 | BuildRequires: perl-tools-devel | |
23 | BuildRequires: perl-tools-pod | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | AppArmor Parser is a userlevel program that is used to load in program | |
28 | profiles to the AppArmor Security kernel module. This package is part | |
29 | of a suite of tools that used to be named SubDomain. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | AppArmor Parser to program przestrzeni użytkownika służący do | |
33 | wczytywania profili programów dla modułu bezpieczeństwa AppArmor jądra | |
34 | Linuksa. Ten pakiet jest częścią zestawu narzędzi nazywanych | |
35 | SubDomain. | |
36 | ||
37 | %prep | |
38 | %setup -q -n AppArmor-%{version} | |
39 | cd parser | |
40 | %patch0 -p1 | |
41 | ||
42 | %build | |
43 | %{__make} -C parser main \ | |
44 | CC="%{__cc}" \ | |
45 | CXX="%{__cxx}" \ | |
46 | CFLAGS="%{rpmcflags} %{rpmcppflags}" | |
47 | ||
48 | %{?with_tests:%{__make} -C parser tests} | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | cd parser | |
53 | ||
54 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor} | |
55 | ||
56 | install apparmor_parser $RPM_BUILD_ROOT/sbin | |
57 | install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
58 | install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
59 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor | |
60 | ||
61 | %{__make} -C po install \ | |
62 | DESTDIR=$RPM_BUILD_ROOT \ | |
63 | NAME=%{name} | |
64 | ||
65 | cd .. | |
66 | %find_lang %{name} | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %post | |
72 | /sbin/chkconfig --add apparmor | |
73 | ||
74 | %preun | |
75 | if [ "$1" = "0" ]; then | |
76 | /sbin/chkconfig --del apparmor | |
77 | fi | |
78 | ||
79 | %files -f %{name}.lang | |
80 | %defattr(644,root,root,755) | |
81 | %doc parser/README | |
82 | %attr(755,root,root) /sbin/apparmor_parser | |
83 | %dir %{_sysconfdir}/apparmor | |
84 | %{_sysconfdir}/apparmor/rc.apparmor.functions | |
85 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/subdomain.conf | |
86 | %attr(754,root,root) /etc/rc.d/init.d/apparmor | |
87 | #%attr(754,root,root) /etc/rc.d/init.d/aaeventd | |
88 | /subdomain | |
89 | /var/lib/apparmor |