]>
Commit | Line | Data |
---|---|---|
161c32d3 AM |
1 | |
2 | %bcond_without tests | |
3 | ||
ea398edf | 4 | Summary: AppArmor userlevel parser utility |
fbf7dafd | 5 | Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor |
ea398edf | 6 | Name: apparmor-parser |
e45645db | 7 | Version: 2.5 |
5031e4b4 | 8 | Release: 1 |
ebb6b625 | 9 | Epoch: 1 |
95a21c97 | 10 | License: GPL |
ea398edf | 11 | Group: Applications/System |
e45645db AM |
12 | Source0: http://kernel.org/pub/linux/security/apparmor/AppArmor-%{version}/AppArmor-%{version}.tgz |
13 | # Source0-md5: 4a747d1a1f85cb272d55b52c7e8a4a02 | |
ca38f6f7 | 14 | Source1: %{name}.init |
e45645db AM |
15 | Patch0: %{name}-make.patch |
16 | URL: http://apparmor.wiki.kernel.org/ | |
ea398edf | 17 | BuildRequires: bison |
18 | BuildRequires: flex | |
19 | BuildRequires: gettext-devel | |
20 | BuildRequires: libcap-devel | |
f418cd35 | 21 | BuildRequires: perl-Test-Harness |
52b590f9 | 22 | BuildRequires: perl-tools-devel |
ebb6b625 | 23 | BuildRequires: perl-tools-pod |
ea398edf | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
ea398edf | 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 | ||
96a4891b JR |
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 | |
161c32d3 | 35 | SubDomain. |
95a21c97 | 36 | |
ea398edf | 37 | %prep |
e45645db AM |
38 | %setup -q -n AppArmor-%{version} |
39 | cd parser | |
40 | %patch0 -p1 | |
ea398edf | 41 | |
42 | %build | |
19f8cb59 | 43 | %{__make} -C parser main manpages \ |
ea398edf | 44 | CC="%{__cc}" \ |
ebb6b625 | 45 | CXX="%{__cxx}" \ |
e45645db | 46 | CFLAGS="%{rpmcflags} %{rpmcppflags}" |
ea398edf | 47 | |
e45645db | 48 | %{?with_tests:%{__make} -C parser tests} |
161c32d3 | 49 | |
ea398edf | 50 | %install |
51 | rm -rf $RPM_BUILD_ROOT | |
e45645db | 52 | cd parser |
ea398edf | 53 | |
19f8cb59 | 54 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,7,8},%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor} |
ca38f6f7 | 55 | |
ea398edf | 56 | install apparmor_parser $RPM_BUILD_ROOT/sbin |
57 | install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
ca38f6f7 AM |
58 | install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor |
59 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor | |
19f8cb59 AM |
60 | install *.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
61 | install *.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
62 | install *.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
ca38f6f7 | 63 | |
ea398edf | 64 | %{__make} -C po install \ |
65 | DESTDIR=$RPM_BUILD_ROOT \ | |
66 | NAME=%{name} | |
77400ddc | 67 | |
e45645db | 68 | cd .. |
ea398edf | 69 | %find_lang %{name} |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
ca38f6f7 AM |
74 | %post |
75 | /sbin/chkconfig --add apparmor | |
76 | ||
77 | %preun | |
78 | if [ "$1" = "0" ]; then | |
79 | /sbin/chkconfig --del apparmor | |
80 | fi | |
81 | ||
ea398edf | 82 | %files -f %{name}.lang |
83 | %defattr(644,root,root,755) | |
e45645db | 84 | %doc parser/README |
8fcfab1b | 85 | %attr(755,root,root) /sbin/apparmor_parser |
ea398edf | 86 | %dir %{_sysconfdir}/apparmor |
ca38f6f7 | 87 | %{_sysconfdir}/apparmor/rc.apparmor.functions |
ea398edf | 88 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/subdomain.conf |
ca38f6f7 | 89 | %attr(754,root,root) /etc/rc.d/init.d/apparmor |
ea398edf | 90 | #%attr(754,root,root) /etc/rc.d/init.d/aaeventd |
ea398edf | 91 | /subdomain |
92 | /var/lib/apparmor | |
19f8cb59 | 93 | %{_mandir}/man[578]/*.[578]* |