File libapparmor1.spec of Package libapparmor1
#
# spec file for package libapparmor1 (Version 2.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: libapparmor1
Url: http://forge.novell.com/modules/xfmod/project/?apparmor
%define _unpackaged_files_terminate_build 0
Version: 2.3
Release: 55.<RELEASE2>
License: LGPL v2.1 or later
Group: Development/Libraries/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
BuildRequires: bison flex gcc perl swig
# bug437293
%ifarch ppc64
Obsoletes: libapparmor-64bit
%endif
#
Provides: libapparmor
Provides: libimmunix
Obsoletes: libapparmor
Obsoletes: libimmunix
Summary: Utility library for AppArmor
Patch: libapparmor1-2.3-no_static.patch
Patch1: libapparmor1-2.3-new-log-format-fix
%define aalibversion 1.0.2
%description
This package provides the libapparmor library, which contains the
change_hat(2) symbol, used for sub-process confinement by AppArmor, as
well as functions to parse AppArmor log messages.
Authors:
--------
Steve Beattie <sbeattie@suse.de>
Matt Barringer <mbarringer@suse.de>
%package -n libapparmor-devel
License: LGPL v2.1 or later
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries/C and C++
Provides: libapparmor:/usr/include/sys/apparmor.h
Summary: Development headers and libraries for libapparmor.
%description -n libapparmor-devel
Development headers and libraries for libapparmor.
Authors:
--------
Steve Beattie <sbeattie@suse.de>
Matt Barringer <mbarringer@suse.de>
%package -n perl-libapparmor
License: GPL v2 only ; LGPL v2.1 or later
Requires: %{name} = %{version}
Requires: perl = %{perl_version}
Group: Development/Libraries/Perl
Summary: Perl interface for libapparmor functions.
%description -n perl-libapparmor
This package provides the perl interface to change_hat and AppArmor log
parsing routines.
Authors:
--------
Steve Beattie <sbeattie@suse.de>
Matt Barringer <mbarringer@suse.de>
%prep
%setup -q
%patch
%patch1 -p1
%build
# FIXME: -Wl,--as-needed is enabled by default for openSUSE-11.2
# It causes some symbols to not be available for genprof et al.
export SUSE_ASNEEDED=0
autoreconf -fiv
%configure --libdir=/%{_lib} --disable-static --with-pic --with-perl
%{__make} %{?jobs:-j%jobs}
%install
make install DESTDIR="$RPM_BUILD_ROOT"
%{__mkdir_p} %{buildroot}%{_libdir}
for libname in libapparmor libimmunix;do
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/$libname.so) %{buildroot}%{_libdir}/$libname.so
%{__rm} -v %{buildroot}/%{_lib}/$libname.{la,so}
done
find $RPM_BUILD_ROOT -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -name perllocal.pod -exec rm -f {} \;
# create symlink for old change_hat(2) manpage
ln -s aa_change_hat.2 ${RPM_BUILD_ROOT}/%{_mandir}/man2/change_hat.2
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
/%{_lib}/libapparmor.so.*
/%{_lib}/libimmunix.so.*
%files -n libapparmor-devel
%defattr(-,root,root)
%{_libdir}/libapparmor.so
%{_libdir}/libimmunix.so
%doc %{_mandir}/man*/*
%dir %{_includedir}/aalogparse
%{_includedir}/sys/apparmor.h
%{_includedir}/aalogparse/*
%files -n perl-libapparmor
%defattr(-,root,root)
%dir %{perl_vendorarch}/auto/LibAppArmor
%{perl_vendorarch}/auto/LibAppArmor/*
%{perl_vendorarch}/LibAppArmor.pm
%changelog