Blob Blame History Raw
Name:		prelude-lml           
Version:	0.9.14
Release:	2%{?dist}
Summary:	The prelude log analyzer

Group:		System Environment/Libraries
License:	GPLv2+
URL:		http://prelude-ids.org/
Source0:	http://www.prelude-ids.org/download/releases/%{name}/%{name}-%{version}.tar.gz
Source1:        prelude-lml.init
Patch1:		prelude-lml-0.9.12-pie.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gamin-devel, libprelude-devel, pcre-devel  
Requires(post):	/sbin/chkconfig
Requires(preun):	/sbin/chkconfig
Requires(preun):	/sbin/service
Requires(postun):	/sbin/service

%description
Prelude-LML’s primary function is log analysis. Logs on a local system or
logs monitored over the network (if configured to accept syslog messages
from other hosts) can be processed and analyzed in order to discover
security anomalies.

%package devel
Summary: Header files and libraries for libprelude development
Group: Development/Libraries
Requires: libprelude-devel, prelude-lml = %{version}-%{release}

%description devel
Libraries, include files, etc you can use to develop Prelude IDS
sensors using the Prelude Library. The Prelude Library is a
collection of generic functions providing communication between
the Prelude Hybrid IDS suite componentst It provides a convenient
interface for sending alerts to Prelude Manager with transparent
SSL, failover and replication support, asynchronous events and
timer interfaces, an abstracted configuration API (hooking at the
commandline, the configuration line, or wide configuration,
available from the Manager), and a generic plugin API. It allows
you to easily turn your favorite security program into a Prelude
sensor.

%prep
%setup -q
%patch1 -p1
sed -i.debug -e '/nlist/s|\$rm|: $rm|' ltmain.sh


%build
%configure	
make %{?_smp_mflags} 
iconv -f ISO8859-15 -t UTF-8 NEWS > NEWS.utf8 && \
%{__mv} NEWS.utf8 NEWS
iconv -f ISO8859-15 -t UTF-8 ChangeLog > ChangeLog.utf8 && \
%{__mv} ChangeLog.utf8 ChangeLog



%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
mkdir -p %{buildroot}/%{_initrddir}/
mkdir -p %{buildroot}/var/lib/%{name}/
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
cp -p  AUTHORS README ChangeLog NEWS COPYING HACKING.README %{buildroot}%{_defaultdocdir}/%{name}-%{version}  
install -m 755 %{SOURCE1} %{buildroot}/%{_initrddir}/%{name}
rm -f %{buildroot}/%{_libdir}/%{name}/debug.la
rm -f %{buildroot}/%{_libdir}/%{name}/pcre.la

%clean
rm -rf %{buildroot}

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

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

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


%files
%defattr(755,root,root,-)
%config %attr(0750,root,root) %dir %{_sysconfdir}/%{name}/
%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/%{name}/*.conf
%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/%{name}/*.rules
%config %attr(0750,root,root) %dir %{_sysconfdir}/%{name}/ruleset/
%config(noreplace) %attr(0640,root,root)%{_sysconfdir}/%{name}/ruleset/*
%{_initrddir}/%{name}
%{_bindir}/prelude-lml
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/debug.so
%{_libdir}/%{name}/pcre.so
%attr(0750,root,root) %dir /var/lib/%{name}/
%dir %{_defaultdocdir}/%{name}-%{version}/
%doc %{_defaultdocdir}/%{name}-%{version}/*

%files devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/prelude-lml.h


%changelog
* Wed Apr 22 2009 Steve Grubb <sgrubb@redhat.com> 0.9.14-2
- Adjust dir and config file permissions

* Fri Oct 17 2008 Steve Grubb <sgrubb@redhat.com> 0.9.14-1
- new upstream release fixing bz #463459

* Sat Oct 11 2008 Steve Grubb <sgrubb@redhat.com> 0.9.13-2
- improved mod_security rules

* Wed Aug 27 2008 Steve Grubb <sgrubb@redhat.com> 0.9.13-1
- new upstream release

* Wed Jun 25 2008 Tomas Mraz <tmraz@redhat.com> - 0.9.12.2-2
- rebuild with new gnutls

* Thu Apr 24 2008 Steve Grubb <sgrubb@redhat.com> 0.9.12.2-1
- new upstream release

* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.11-2
- Autorebuild for GCC 4.3

* Mon Jan 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.11-1
- new upstream version 0.9.11

* Thu Jan 09 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.8.1-5
- changed init-script description 

* Mon Jan 08 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.8.1-4
- added new /var/lib directory 

* Fri Jan 05 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.8.1-3
- added init-script
- changed some macros in %%files

* Tue Jan 02 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.8.1-2
- fixed debug problems
- fixed encoding problems

* Fri Dec 29 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.8.1-1
- moved to new upstream version 0.9.8.1
- changed dirowner of /etc/prelude-lml

* Mon Nov 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.7-2
- Some minor fixes in requirements

* Tue Oct 23 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.7-1
- New Fedora build based on release 0.9.7