File libaudit0.spec of Package libaudit0

#
# spec file for package libaudit0
#
# Copyright (c) 2011 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

%define _name	audit

Name:           libaudit0
BuildRequires:  gcc-c++ libtool tcpd-devel
Summary:        User Space Tools for 2.6 Kernel Auditing
Version:        1.7.13
Release:        7
License:        GPL-2.0+
Group:          System/Monitoring
Url:            http://people.redhat.com/sgrubb/audit/
Source0:        %{_name}-%{version}.tar.bz2
Source1:        baselibs.conf
Patch0:         audit-no_sca.patch
Patch1:         audit-no_python.patch
Patch2:         audit-no_plugins.patch
Patch3:         audit-no-gss.patch
Patch4:         audit-as_needed.patch
Patch5:         audit-header.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq %fillup_prereq

%description
The libaudit0 package contains the libaudit dynamic libraries needed for
applications to use the audit framework. This is a temporary package
created to allow baselibs update to audit version 2.0.4

Authors:
--------
    Steve Grubb <sgrubb@redhat.com>

%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4
%patch5 -p1

%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
# no krb support (omit --enable-gssapi-krb5=yes), see audit-no-gss.patch
%configure --sbindir=/sbin \
			--libdir=/%{_lib} --libexecdir=%{_prefix}/lib/%{name} \
			--with-apparmor --with-libwrap \
			--disable-static --with-pic
%{__make} %{?jobs:-j%jobs}

%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install -C lib
mkdir -p $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/libaudit.so) %{buildroot}%{_libdir}/libaudit.so
rm $RPM_BUILD_ROOT/%{_includedir}/libaudit.h
rm $RPM_BUILD_ROOT/%{_libdir}/libaudit.so
rm $RPM_BUILD_ROOT/%{_lib}/libaudit.so
rm $RPM_BUILD_ROOT/%{_lib}/libaudit.*a
cp $RPM_BUILD_DIR/%{_name}-%{version}/init.d/libaudit.conf $RPM_BUILD_ROOT/etc

%check
make check

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/%{_lib}/libaudit.*
%config(noreplace) %attr(640,root,root) /etc/libaudit.conf

%changelog
openSUSE Build Service is sponsored by