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

Name: prelude-correlator
Version: 0.9.0
Release: 0.7.%{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
Patch1: prelude-correlator-0.9.0-brute.patch
Patch2: prelude-correlator-0.9.0-signal.patch
Patch3: prelude-correlator-0.9.0-getraw.patch

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}
%patch1 -p1
%patch2 -p1
%patch3 -p1

%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
* Mon Mar 02 2009 Steve Grubb <sgrubb@redhat.com> 0.9.0-0.7.beta3
- Fix bz#484361 Error message regarding missing arguments lua ruleset

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-0.6.beta3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Dec 05 2008 Steve Grubb <sgrubb@redhat.com> 0.9.0-0.5.beta3
- Fix bz#469824 Correct brute force correlation rules
- Add signal header to prelude-correlator.c so it builds correctly bz 474698
- Include unowned /usr/include/prelude-correlator directory

*Fri Jul 11 2008 Steve Grubb <sgrubb@redhat.com> 0.9.0-0.3.beta3
- New beta release

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