-
-%bcond_without tests
-
+#
+# Conditional build:
+%bcond_without tests # don't perform "make tests"
+%bcond_with dynamic # link libstdc++ and libgcc dynamically
+#
Summary: AppArmor userlevel parser utility
Summary(pl.UTF-8): Narzędzie przestrzeni użytkownika do przetwarzania AppArmor
Name: apparmor-parser
-Version: 2.7.2
+Version: 2.8.1
Release: 1
Epoch: 1
-License: GPL
+License: GPL v2
Group: Applications/System
-Source0: http://launchpad.net/apparmor/2.7/%{version}/+download/apparmor-%{version}.tar.gz
-# Source0-md5: 2863e85bdfdf9ee35b83db6721fed1f1
+Source0: http://launchpad.net/apparmor/2.8/%{version}/+download/apparmor-%{version}.tar.gz
+# Source0-md5: 83ae6c8190e91cf2146da8942951d305
Source1: %{name}.init
Patch0: %{name}-pld.patch
URL: http://apparmor.wiki.kernel.org/
BuildRequires: libcap-devel
BuildRequires: libstdc++-devel
# for apparmor_profile which links statically sometimes
-BuildRequires: libstdc++-static
-BuildRequires: perl-Test-Harness
-BuildRequires: perl-tools-devel
+%{!?with_dynamic:BuildRequires: libstdc++-static}
BuildRequires: perl-tools-pod
%if %{with tests}
BuildRequires: perl-Locale-gettext
+BuildRequires: perl-Test-Harness
+BuildRequires: perl-tools-devel
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%{__make} -j1 -C parser \
CC="%{__cc}" \
CXX="%{__cxx}" \
- CFLAGS="%{rpmcflags} %{rpmcppflags}"
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=}
-%{?with_tests:%{__make} -j1 -C parser tests}
+%if %{with tests}
+%{__make} -j1 -C parser tests \
+ CC="%{__cc}" \
+ %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=-lstdc++}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
%attr(754,root,root) /etc/rc.d/init.d/apparmor
/subdomain
/var/lib/apparmor
-%{_mandir}/man[578]/*.[578]*
+%{_mandir}/man5/apparmor.d.5*
+%{_mandir}/man5/apparmor.vim.5*
+%{_mandir}/man5/subdomain.conf.5*
+%{_mandir}/man7/apparmor.7*
+%{_mandir}/man8/apparmor_parser.8*