]> git.pld-linux.org Git - packages/apparmor-parser.git/blame_incremental - apparmor-parser.spec
Version: 2.9.2
[packages/apparmor-parser.git] / apparmor-parser.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # don't perform "make tests"
4%bcond_with dynamic # link libstdc++ and libgcc dynamically
5#
6Summary: AppArmor userlevel parser utility
7Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor
8Name: apparmor-parser
9Version: 2.9.2
10Release: 1
11Epoch: 1
12License: GPL v2
13Group: Applications/System
14Source0: http://launchpad.net/apparmor/2.9/%{version}/+download/apparmor-%{version}.tar.gz
15# Source0-md5: 3af6ef84881016bf8d9100f3f8ab036b
16Source1: %{name}.init
17Patch0: %{name}-pld.patch
18URL: http://apparmor.wiki.kernel.org/
19BuildRequires: bison
20BuildRequires: flex
21BuildRequires: gettext-tools
22BuildRequires: libapparmor-devel
23BuildRequires: libcap-devel
24BuildRequires: libstdc++-devel
25# for apparmor_profile which links statically sometimes
26%if %{without dynamic}
27BuildRequires: libapparmor-static
28BuildRequires: libstdc++-static
29%endif
30BuildRequires: perl-tools-pod
31%if %{with tests}
32BuildRequires: perl-Locale-gettext
33BuildRequires: perl-Test-Harness
34BuildRequires: perl-tools-devel
35%endif
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39AppArmor Parser is a userlevel program that is used to load in program
40profiles to the AppArmor Security kernel module. This package is part
41of a suite of tools that used to be named SubDomain.
42
43%description -l pl.UTF-8
44AppArmor Parser to program przestrzeni użytkownika służący do
45wczytywania profili programów dla modułu bezpieczeństwa AppArmor jądra
46Linuksa. Ten pakiet jest częścią zestawu narzędzi nazywanych
47SubDomain.
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
69rm -rf $RPM_BUILD_ROOT
70cd parser
71
72install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,7,8},%{_sysconfdir}/{apparmor,rc.d/init.d},/sbin,/subdomain,/var/lib/apparmor}
73
74install apparmor_parser $RPM_BUILD_ROOT/sbin
75install subdomain.conf $RPM_BUILD_ROOT%{_sysconfdir}/apparmor
76install rc.apparmor.functions $RPM_BUILD_ROOT%{_sysconfdir}/apparmor
77install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apparmor
78install *.5 $RPM_BUILD_ROOT%{_mandir}/man5
79install *.7 $RPM_BUILD_ROOT%{_mandir}/man7
80install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
81
82%{__make} -j1 -C po install \
83 DESTDIR=$RPM_BUILD_ROOT \
84 NAME=%{name}
85
86cd ..
87%find_lang %{name}
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%post
93/sbin/chkconfig --add apparmor
94
95%preun
96if [ "$1" = "0" ]; then
97 /sbin/chkconfig --del apparmor
98fi
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*
This page took 0.228102 seconds and 4 git commands to generate.