Blob Blame History Raw
# This is temporary while its in beta
%define prelude_rel beta2

Name: prelude-correlator
Version: 0.9.0
Release: 0.2.%{prelude_rel}%{?dist}
Summary: Real time correlator of events received by Prelude Manager

Group: Applications/Internet
License: GPLv2+
URL: http://www.prelude-ids.com
Source0: http://www.prelude-ids.com/download/releases/prelude-correlator/%{name}-%{version}-%{prelude_rel}.tar.gz
Source1: prelude-correlator.init

Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
BuildRequires: libprelude-devel
BuildRequires: pcre-devel
BuildRequires: lua-devel
BuildRequires: pkgconfig
Requires(pre)   : /usr/sbin/useradd
Requires(post)  : /sbin/chkconfig
Requires(preun) : /sbin/chkconfig
Requires(preun) : /sbin/service
Requires(postun): /sbin/service


%description
Prelude-Correlator serves to correlate, in real time, the multiple events
received by Prelude Manager. Several isolated alerts, generated from
different probes, can thus trigger a single correlation alert should the
events be related. This correlation alert then appears within the Prewikka
interface and indicates the potential target information via the set of
correlation rules. 


%package devel
Summary: Header files for developing a prelude-correlator plugin
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libprelude-devel

%description devel
Include files needed to create plugins for the Prelude-Correlator.


%prep
%setup -q -n %{name}-%{version}-%{prelude_rel}

%build
%configure 
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
mkdir -p  %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_initrddir}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
install -m 755 %SOURCE1 %{buildroot}%{_initrddir}/%{name}
rm -f %{buildroot}/%{_libdir}/%{name}/*.la


%clean
rm -rf %{buildroot}


%post
/sbin/chkconfig --add %{name}


%preun
if [ $1 = 0 ]; then
	/sbin/service %{name} stop > /dev/null 2>&1 || :
	/sbin/chkconfig --del %{name}
fi


%postun
if [ "$1" -ge "1" ]; then
	/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS HACKING.README 
%dir %attr(0700,root,root) %{_sysconfdir}/%{name}
%dir %attr(0700,root,root) %{_sysconfdir}/%{name}/lua-rules
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/lua-rules/*
%{_initrddir}/%{name}
%dir %attr(0755,root,root) %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_bindir}/%{name}
%{_libdir}/*


%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/*


%changelog
*Thu Jul 03 2008 Steve Grubb <sgrubb@redhat.com> 0.9.0-0.1.beta2
- Initial packaging