# $CoreSDI: audit.rh.spec.sed,v 1.1.2.1 2002/01/02 23:51:18 claudio Exp $
# 
# Copyright (c) 2000, 2001, Core SDI S.A., Argentina
# All rights reserved
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither name of the Core SDI S.A. nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# basic audit rpm package
#

%define  ver     	vAUDIT_VERSION
%define  RELEASE 	0
%define  rel     	%{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define  prefix  	/usr
%define  sysdocs 	/usr/doc

Name:      		audit
Summary:   		Remote system logs auditing system
Version:		%ver
Release:		%rel
Distribution:		RedHat Linux 7.1 (i386)
Copyright: 	  	BSD
Group: 			Security/Net
URL:			http://www.corest.com/solutions/products.html
Packager:     		core.devel.alat@corest.com
Provides:		audit
Requires:		glibc zlib openssl

Docdir:    		%{sysdocs}
BuildRoot: 		/var/tmp/rpm/audit-%{PACKAGE_VERSION}-root

Source:     		audit-%{PACKAGE_VERSION}-src.tar.gz

%description
Audit is a client/server system that allows remote system logs
auditing and centralizing, it supports standard and modular syslog
output formats.
The server (auditd) runs on audited machines and the client (audit)
runs on the auditors workstations. Multiple auditors are supported
and managed by one or more auditors 'chief'; auditors can be
configured in a way that each of them can examine specific sets of
logs.

Authors: core.devel.alat@corest.com

%prep

%setup
./configure --prefix=$RPM_BUILD_ROOT%{prefix} --with-included-gettext \
	--with-audit-libdir=$RPM_BUILD_ROOT%{prefix}/lib/alat \
	--with-audit-rlibdir=%{prefix}/lib/alat

%build
CFLAGS="$RPM_OPT_FLAGS" make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/alat
make install
strip $RPM_BUILD_ROOT%{prefix}/bin/*
strip $RPM_BUILD_ROOT%{prefix}/sbin/*

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{prefix}/bin/audit
%{prefix}/sbin/auditd
%{prefix}/lib/alat/*
%{prefix}/man/man1/*
%{prefix}/man/man8/*
%doc COPYING INSTALL README TODO auditd.conf

%postun
rmdir --ignore-fail-on-non-empty /usr/lib/alat

