prelude-lml/prelude-lml.spec

110 lines
3.4 KiB
RPMSpec

#
# spec file for package prelude-lml
#
# Copyright (c) 2016 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/
#
Name: prelude-lml
Version: 3.0.0
Release: 0
Summary: The prelude log analyzer
License: GPL-2.0+
Group: System Environment/Daemon
Url: https://www.prelude-siem.org
Source0: https://www.prelude-siem.org/pkg/src/3.0.0/%{name}-%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.run
BuildRequires: gamin-devel
BuildRequires: pcre-devel
BuildRequires: libprelude-devel
BuildRequires: systemd
Requires: libprelude23
%{?systemd_requires}
%description
Prelude-LML is a log analyser that allows Prelude to collect and
analyze information from all kind of applications emitting logs or
syslog messages in order to detect suspicious activities and transform
them into Prelude-IDMEF alerts. Prelude-LML handles events generated
by a large set of applications
%package devel
Summary: Header files and libraries for prelude-lml development
Group: Development/Libraries
Requires: libprelude-devel
Requires: %{name} = %{version}-%{release}
%description devel
Libraries, include files, etc you can use to develop custom
Prelude LML plugins.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/ruleset/
mkdir -p %{buildroot}/%{_sbindir}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
rm -f %{buildroot}/%{_libdir}/%{name}/debug.la
rm -f %{buildroot}/%{_libdir}/%{name}/pcre.la
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}
install -m 0644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
mkdir -p %{buildroot}/%{_localstatedir}/spool/prelude/%{name}/
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
rm -rf %{buildroot}/%{_localstatedir}/run/%{name}
install -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%pre
%service_add_pre %{name}.service
%post
/sbin/ldconfig
/usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
/sbin/ldconfig
%service_del_postun %{name}.service
%files
%defattr(-,root,root,-)
%doc COPYING NEWS HACKING.README README
%attr(0770,-,-) %dir %{_sysconfdir}/%{name}/
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/%{name}/plugins.rules
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/%{name}/%{name}.conf
%attr(0770,-,-) %dir %{_sysconfdir}/%{name}/ruleset/
%{_bindir}/%{name}
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/debug.so
%{_libdir}/%{name}/pcre.so
%{_sbindir}/rc%{name}
%dir %{_tmpfilesdir}
%{_tmpfilesdir}/%{name}.conf
%attr(0750,-,-) %dir %{_localstatedir}/spool/prelude/%{name}
%{_unitdir}/%{name}.service
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/%{name}.h
%changelog