]>
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 |
4694c997 AM |
7 | Version: 2.7.2 |
8 | Release: 1 | |
ebb6b625 | 9 | Epoch: 1 |
95a21c97 | 10 | License: GPL |
ea398edf | 11 | Group: Applications/System |
4694c997 AM |
12 | Source0: http://launchpad.net/apparmor/2.7/%{version}/+download/apparmor-%{version}.tar.gz |
13 | # Source0-md5: 2863e85bdfdf9ee35b83db6721fed1f1 | |
ca38f6f7 | 14 | Source1: %{name}.init |
4694c997 | 15 | Patch0: %{name}-pld.patch |
e45645db | 16 | URL: http://apparmor.wiki.kernel.org/ |
ea398edf | 17 | BuildRequires: bison |
18 | BuildRequires: flex | |
19 | BuildRequires: gettext-devel | |
20 | BuildRequires: libcap-devel | |
a476cbbe | 21 | BuildRequires: libstdc++-devel |
48936609 AM |
22 | # for apparmor_profile which links statically sometimes |
23 | BuildRequires: libstdc++-static | |
f418cd35 | 24 | BuildRequires: perl-Test-Harness |
52b590f9 | 25 | BuildRequires: perl-tools-devel |
ebb6b625 | 26 | BuildRequires: perl-tools-pod |
99a319bc AM |
27 | %if %{with tests} |
28 | BuildRequires: perl-Locale-gettext | |
29 | %endif | |
ea398edf | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
ea398edf | 32 | %description |
33 | AppArmor Parser is a userlevel program that is used to load in program | |
34 | profiles to the AppArmor Security kernel module. This package is part | |
35 | of a suite of tools that used to be named SubDomain. | |
36 | ||
96a4891b JR |
37 | %description -l pl.UTF-8 |
38 | AppArmor Parser to program przestrzeni użytkownika służący do | |
39 | wczytywania profili programów dla modułu bezpieczeństwa AppArmor jądra | |
40 | Linuksa. Ten pakiet jest częścią zestawu narzędzi nazywanych | |
161c32d3 | 41 | SubDomain. |
95a21c97 | 42 | |
ea398edf | 43 | %prep |
423ac441 | 44 | %setup -q -n apparmor-%{version} |
99a319bc | 45 | %patch0 -p0 |
ea398edf | 46 | |
47 | %build | |
4694c997 | 48 | %{__make} -j1 -C parser \ |
ea398edf | 49 | CC="%{__cc}" \ |
ebb6b625 | 50 | CXX="%{__cxx}" \ |
e45645db | 51 | CFLAGS="%{rpmcflags} %{rpmcppflags}" |
ea398edf | 52 | |
4694c997 | 53 | %{?with_tests:%{__make} -j1 -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 | |
4694c997 | 69 | %{__make} -j1 -C po install \ |
ea398edf | 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]* |