]>
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 |
eb26b1f3 | 8 | Release: 5 |
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 |
f8e12536 | 15 | Patch0: %{name}-bzr.patch |
04a40d1a | 16 | Patch1: %{name}-rc.patch |
e45645db | 17 | URL: http://apparmor.wiki.kernel.org/ |
ea398edf | 18 | BuildRequires: bison |
19 | BuildRequires: flex | |
20 | BuildRequires: gettext-devel | |
21 | BuildRequires: libcap-devel | |
a476cbbe | 22 | BuildRequires: libstdc++-devel |
f418cd35 | 23 | BuildRequires: perl-Test-Harness |
52b590f9 | 24 | BuildRequires: perl-tools-devel |
ebb6b625 | 25 | BuildRequires: perl-tools-pod |
ea398edf | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
ea398edf | 28 | %description |
29 | AppArmor Parser is a userlevel program that is used to load in program | |
30 | profiles to the AppArmor Security kernel module. This package is part | |
31 | of a suite of tools that used to be named SubDomain. | |
32 | ||
96a4891b JR |
33 | %description -l pl.UTF-8 |
34 | AppArmor Parser to program przestrzeni użytkownika służący do | |
35 | wczytywania profili programów dla modułu bezpieczeństwa AppArmor jądra | |
36 | Linuksa. Ten pakiet jest częścią zestawu narzędzi nazywanych | |
161c32d3 | 37 | SubDomain. |
95a21c97 | 38 | |
ea398edf | 39 | %prep |
e45645db | 40 | %setup -q -n AppArmor-%{version} |
f8e12536 | 41 | %patch0 -p0 |
e45645db | 42 | cd parser |
04a40d1a | 43 | %patch1 -p0 |
ea398edf | 44 | |
45 | %build | |
19f8cb59 | 46 | %{__make} -C parser main manpages \ |
ea398edf | 47 | CC="%{__cc}" \ |
ebb6b625 | 48 | CXX="%{__cxx}" \ |
e45645db | 49 | CFLAGS="%{rpmcflags} %{rpmcppflags}" |
ea398edf | 50 | |
e45645db | 51 | %{?with_tests:%{__make} -C parser tests} |
161c32d3 | 52 | |
ea398edf | 53 | %install |
54 | rm -rf $RPM_BUILD_ROOT | |
e45645db | 55 | cd parser |
ea398edf | 56 | |
19f8cb59 | 57 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,7,8},%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor} |
ca38f6f7 | 58 | |
ea398edf | 59 | install apparmor_parser $RPM_BUILD_ROOT/sbin |
60 | install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
ca38f6f7 AM |
61 | install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor |
62 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor | |
19f8cb59 AM |
63 | install *.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
64 | install *.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
65 | install *.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
ca38f6f7 | 66 | |
ea398edf | 67 | %{__make} -C po install \ |
68 | DESTDIR=$RPM_BUILD_ROOT \ | |
69 | NAME=%{name} | |
77400ddc | 70 | |
e45645db | 71 | cd .. |
ea398edf | 72 | %find_lang %{name} |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
ca38f6f7 AM |
77 | %post |
78 | /sbin/chkconfig --add apparmor | |
79 | ||
80 | %preun | |
81 | if [ "$1" = "0" ]; then | |
82 | /sbin/chkconfig --del apparmor | |
83 | fi | |
84 | ||
ea398edf | 85 | %files -f %{name}.lang |
86 | %defattr(644,root,root,755) | |
e45645db | 87 | %doc parser/README |
8fcfab1b | 88 | %attr(755,root,root) /sbin/apparmor_parser |
ea398edf | 89 | %dir %{_sysconfdir}/apparmor |
ca38f6f7 | 90 | %{_sysconfdir}/apparmor/rc.apparmor.functions |
ea398edf | 91 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/subdomain.conf |
ca38f6f7 | 92 | %attr(754,root,root) /etc/rc.d/init.d/apparmor |
ea398edf | 93 | #%attr(754,root,root) /etc/rc.d/init.d/aaeventd |
ea398edf | 94 | /subdomain |
95 | /var/lib/apparmor | |
19f8cb59 | 96 | %{_mandir}/man[578]/*.[578]* |