-
-%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.6.1
-Release: 2
+Version: 2.7.2
+Release: 1
Epoch: 1
-License: GPL
+License: GPL v2
Group: Applications/System
-Source0: http://launchpad.net/apparmor/2.6/%{version}/+download/apparmor-%{version}.tar.gz
-# Source0-md5: e2dabce946cb8258834f90f0a6c87726
+Source0: http://launchpad.net/apparmor/2.7/%{version}/+download/apparmor-%{version}.tar.gz
+# Source0-md5: 2863e85bdfdf9ee35b83db6721fed1f1
Source1: %{name}.init
-Patch0: %{name}-bzr.patch
-Patch1: %{name}-pld.patch
+Patch0: %{name}-pld.patch
URL: http://apparmor.wiki.kernel.org/
BuildRequires: bison
BuildRequires: flex
BuildRequires: libcap-devel
BuildRequires: libstdc++-devel
# for apparmor_profile which links statically sometimes
-BuildRequires: libstdc++-static
+%{!?with_dynamic:BuildRequires: libstdc++-static}
+BuildRequires: perl-tools-pod
+%if %{with tests}
+BuildRequires: perl-Locale-gettext
BuildRequires: perl-Test-Harness
BuildRequires: perl-tools-devel
-BuildRequires: perl-tools-pod
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q -n apparmor-%{version}
-# reenable when needed
-#%patch0 -p0
-%patch1 -p0
+%patch0 -p0
%build
-%{__make} -C parser main manpages \
+%{__make} -j1 -C parser \
CC="%{__cc}" \
CXX="%{__cxx}" \
- CFLAGS="%{rpmcflags} %{rpmcppflags}"
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ %{?with_dynamic:AAREOBJECTS='$(AAREOBJECT)' AARE_LDFLAGS=}
-%{?with_tests:%{__make} -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
install *.7 $RPM_BUILD_ROOT%{_mandir}/man7
install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
-%{__make} -C po install \
+%{__make} -j1 -C po install \
DESTDIR=$RPM_BUILD_ROOT \
NAME=%{name}
%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*