]>
Commit | Line | Data |
---|---|---|
b3df0fac JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # don't perform "make tests" | |
4 | %bcond_with dynamic # link libstdc++ and libgcc dynamically | |
5 | # | |
ea398edf | 6 | Summary: AppArmor userlevel parser utility |
fbf7dafd | 7 | Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor |
ea398edf | 8 | Name: apparmor-parser |
0a42380f | 9 | Version: 2.12 |
3ed6d33b | 10 | Release: 1 |
ebb6b625 | 11 | Epoch: 1 |
8b32f5b5 | 12 | License: GPL v2 |
ea398edf | 13 | Group: Applications/System |
0a42380f AM |
14 | Source0: http://launchpad.net/apparmor/2.12/%{version}.0/+download/apparmor-%{version}.tar.gz |
15 | # Source0-md5: 49054f58042f8e51ea92cc866575a833 | |
ca38f6f7 | 16 | Source1: %{name}.init |
4694c997 | 17 | Patch0: %{name}-pld.patch |
e0489dd6 | 18 | URL: http://wiki.apparmor.net/ |
ea398edf | 19 | BuildRequires: bison |
20 | BuildRequires: flex | |
e2b8c2ab | 21 | BuildRequires: gettext-tools |
9c5ae45e | 22 | BuildRequires: libapparmor-devel >= 1:%{version} |
ea398edf | 23 | BuildRequires: libcap-devel |
a476cbbe | 24 | BuildRequires: libstdc++-devel |
48936609 | 25 | # for apparmor_profile which links statically sometimes |
8da0f67c JR |
26 | %if %{without dynamic} |
27 | BuildRequires: libapparmor-static | |
28 | BuildRequires: libstdc++-static | |
29 | %endif | |
ebb6b625 | 30 | BuildRequires: perl-tools-pod |
99a319bc AM |
31 | %if %{with tests} |
32 | BuildRequires: perl-Locale-gettext | |
b3df0fac JB |
33 | BuildRequires: perl-Test-Harness |
34 | BuildRequires: perl-tools-devel | |
99a319bc | 35 | %endif |
ea398edf | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
ea398edf | 38 | %description |
39 | AppArmor Parser is a userlevel program that is used to load in program | |
40 | profiles to the AppArmor Security kernel module. This package is part | |
41 | of a suite of tools that used to be named SubDomain. | |
42 | ||
96a4891b JR |
43 | %description -l pl.UTF-8 |
44 | AppArmor Parser to program przestrzeni użytkownika służący do | |
45 | wczytywania profili programów dla modułu bezpieczeństwa AppArmor jądra | |
46 | Linuksa. Ten pakiet jest częścią zestawu narzędzi nazywanych | |
161c32d3 | 47 | SubDomain. |
95a21c97 | 48 | |
ea398edf | 49 | %prep |
423ac441 | 50 | %setup -q -n apparmor-%{version} |
99a319bc | 51 | %patch0 -p0 |
ea398edf | 52 | |
53 | %build | |
4694c997 | 54 | %{__make} -j1 -C parser \ |
ea398edf | 55 | CC="%{__cc}" \ |
ebb6b625 | 56 | CXX="%{__cxx}" \ |
b3df0fac | 57 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
4caff136 JB |
58 | %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS= AALIB=-lapparmor} \ |
59 | USE_SYSTEM=1 | |
ea398edf | 60 | |
b3df0fac JB |
61 | %if %{with tests} |
62 | %{__make} -j1 -C parser tests \ | |
63 | CC="%{__cc}" \ | |
4caff136 JB |
64 | %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=-lstdc++ AALIB=-lapparmor} \ |
65 | USE_SYSTEM=1 | |
b3df0fac | 66 | %endif |
161c32d3 | 67 | |
ea398edf | 68 | %install |
69 | rm -rf $RPM_BUILD_ROOT | |
e45645db | 70 | cd parser |
ea398edf | 71 | |
19f8cb59 | 72 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,7,8},%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor} |
ca38f6f7 | 73 | |
ea398edf | 74 | install apparmor_parser $RPM_BUILD_ROOT/sbin |
75 | install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
ca38f6f7 AM |
76 | install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor |
77 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor | |
19f8cb59 AM |
78 | install *.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
79 | install *.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
80 | install *.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
ca38f6f7 | 81 | |
4694c997 | 82 | %{__make} -j1 -C po install \ |
ea398edf | 83 | DESTDIR=$RPM_BUILD_ROOT \ |
84 | NAME=%{name} | |
77400ddc | 85 | |
e45645db | 86 | cd .. |
ea398edf | 87 | %find_lang %{name} |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
ca38f6f7 AM |
92 | %post |
93 | /sbin/chkconfig --add apparmor | |
94 | ||
95 | %preun | |
96 | if [ "$1" = "0" ]; then | |
97 | /sbin/chkconfig --del apparmor | |
98 | fi | |
99 | ||
ea398edf | 100 | %files -f %{name}.lang |
101 | %defattr(644,root,root,755) | |
e45645db | 102 | %doc parser/README |
8fcfab1b | 103 | %attr(755,root,root) /sbin/apparmor_parser |
ea398edf | 104 | %dir %{_sysconfdir}/apparmor |
ca38f6f7 | 105 | %{_sysconfdir}/apparmor/rc.apparmor.functions |
ea398edf | 106 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/subdomain.conf |
ca38f6f7 | 107 | %attr(754,root,root) /etc/rc.d/init.d/apparmor |
ea398edf | 108 | /subdomain |
109 | /var/lib/apparmor | |
8b32f5b5 | 110 | %{_mandir}/man5/apparmor.d.5* |
8b32f5b5 JB |
111 | %{_mandir}/man5/subdomain.conf.5* |
112 | %{_mandir}/man7/apparmor.7* | |
113 | %{_mandir}/man8/apparmor_parser.8* |