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