]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # don't perform "make tests" | |
4 | %bcond_with dynamic # link libstdc++ and libgcc dynamically | |
5 | # | |
6 | Summary: AppArmor userlevel parser utility | |
7 | Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor | |
8 | Name: apparmor-parser | |
9 | Version: 2.9.2 | |
10 | Release: 1 | |
11 | Epoch: 1 | |
12 | License: GPL v2 | |
13 | Group: Applications/System | |
14 | Source0: http://launchpad.net/apparmor/2.9/%{version}/+download/apparmor-%{version}.tar.gz | |
15 | # Source0-md5: 3af6ef84881016bf8d9100f3f8ab036b | |
16 | Source1: %{name}.init | |
17 | Patch0: %{name}-pld.patch | |
18 | URL: http://apparmor.wiki.kernel.org/ | |
19 | BuildRequires: bison | |
20 | BuildRequires: flex | |
21 | BuildRequires: gettext-tools | |
22 | BuildRequires: libapparmor-devel | |
23 | BuildRequires: libcap-devel | |
24 | BuildRequires: libstdc++-devel | |
25 | # for apparmor_profile which links statically sometimes | |
26 | %if %{without dynamic} | |
27 | BuildRequires: libapparmor-static | |
28 | BuildRequires: libstdc++-static | |
29 | %endif | |
30 | BuildRequires: perl-tools-pod | |
31 | %if %{with tests} | |
32 | BuildRequires: perl-Locale-gettext | |
33 | BuildRequires: perl-Test-Harness | |
34 | BuildRequires: perl-tools-devel | |
35 | %endif | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
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 | ||
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 | |
47 | SubDomain. | |
48 | ||
49 | %prep | |
50 | %setup -q -n apparmor-%{version} | |
51 | %patch0 -p0 | |
52 | ||
53 | %build | |
54 | %{__make} -j1 -C parser \ | |
55 | CC="%{__cc}" \ | |
56 | CXX="%{__cxx}" \ | |
57 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
58 | %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS= AALIB=-lapparmor} \ | |
59 | USE_SYSTEM=1 | |
60 | ||
61 | %if %{with tests} | |
62 | %{__make} -j1 -C parser tests \ | |
63 | CC="%{__cc}" \ | |
64 | %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=-lstdc++ AALIB=-lapparmor} \ | |
65 | USE_SYSTEM=1 | |
66 | %endif | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | cd parser | |
71 | ||
72 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,7,8},%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor} | |
73 | ||
74 | install apparmor_parser $RPM_BUILD_ROOT/sbin | |
75 | install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
76 | install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor | |
77 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor | |
78 | install *.5 $RPM_BUILD_ROOT%{_mandir}/man5 | |
79 | install *.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
80 | install *.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
81 | ||
82 | %{__make} -j1 -C po install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT \ | |
84 | NAME=%{name} | |
85 | ||
86 | cd .. | |
87 | %find_lang %{name} | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post | |
93 | /sbin/chkconfig --add apparmor | |
94 | ||
95 | %preun | |
96 | if [ "$1" = "0" ]; then | |
97 | /sbin/chkconfig --del apparmor | |
98 | fi | |
99 | ||
100 | %files -f %{name}.lang | |
101 | %defattr(644,root,root,755) | |
102 | %doc parser/README | |
103 | %attr(755,root,root) /sbin/apparmor_parser | |
104 | %dir %{_sysconfdir}/apparmor | |
105 | %{_sysconfdir}/apparmor/rc.apparmor.functions | |
106 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/subdomain.conf | |
107 | %attr(754,root,root) /etc/rc.d/init.d/apparmor | |
108 | /subdomain | |
109 | /var/lib/apparmor | |
110 | %{_mandir}/man5/apparmor.d.5* | |
111 | %{_mandir}/man5/subdomain.conf.5* | |
112 | %{_mandir}/man7/apparmor.7* | |
113 | %{_mandir}/man8/apparmor_parser.8* |