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