Fix source URL

Fix dependencies
Use %{name} most of the time

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/prelude-lml?expand=0&rev=2
This commit is contained in:
Thomas ANDREJAK 2016-08-27 15:25:39 +00:00 committed by Git OBS Bridge
parent 669d5f4e70
commit ebb60ce1d6

View File

@ -25,13 +25,14 @@ 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/prelude/src/%{name}-%{version}.tar.gz
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
@ -41,17 +42,17 @@ 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 -n prelude-lml-devel
%package -n %{name}-devel
Summary: Header files and libraries for prelude-lml development
Group: Development/Libraries
Requires: libprelude-devel, prelude-lml = %{version}-%{release}
Requires: libprelude-devel
Requires: %{name} = %{version}-%{release}
%description -n prelude-lml-devel
%description -n %{name}-devel
Libraries, include files, etc you can use to develop custom
Prelude LML plugins.
%package selinux
%package -n %{name}-selinux
Summary: SELinux policy for prelude-lml
Provides: selinux-policy-base
Group: System Environment/Base
@ -64,12 +65,12 @@ Requires(pre): policycoreutils >= %{POLICYCOREUTILSVER}
Requires(pre): coreutils
Requires(pre): selinux-policy-targeted >= %{SELINUXTARGETEDVER}
Requires: selinux-policy-targeted >= %{SELINUXTARGETEDVER}
Requires: prelude-lml = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires(post): policycoreutils >= %{POLICYCOREUTILSVER}
Requires(postun): policycoreutils >= %{POLICYCOREUTILSVER}
BuildArch: noarch
%description selinux
%description -n %{name}-selinux
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
@ -110,12 +111,12 @@ install -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
/usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf
%service_add_post %{name}.service
%post selinux
%post -n %{name}-selinux
if [ $1 -eq 1 ]; then
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/%{name}.pp.bz2
/sbin/restorecon -R /dev/shm/ || :
else
/usr/sbin/semodule -n -s targeted -r prelude-lml 2>/dev/null || :
/usr/sbin/semodule -n -s targeted -r %{name} 2>/dev/null || :
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/%{name}.pp.bz2
fi
@ -126,8 +127,8 @@ fi
/sbin/ldconfig
%service_del_postun %{name}.service
%postun selinux
semodule -n -s targeted -r prelude-lml 2>/dev/null || :
%postun -n %{name}-selinux
semodule -n -s targeted -r %{name} 2>/dev/null || :
/sbin/restorecon -R /dev/shm/ || :
%files
@ -135,9 +136,9 @@ semodule -n -s targeted -r prelude-lml 2>/dev/null || :
%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}/prelude-lml.conf
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/%{name}/%{name}.conf
%attr(0770,-,-) %dir %{_sysconfdir}/%{name}/ruleset/
%{_bindir}/prelude-lml
%{_bindir}/%{name}
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/debug.so
%{_libdir}/%{name}/pcre.so
@ -147,12 +148,12 @@ semodule -n -s targeted -r prelude-lml 2>/dev/null || :
%attr(0750,-,-) %dir %{_localstatedir}/spool/prelude/%{name}
%{_unitdir}/%{name}.service
%files devel
%files -n %{name}-devel
%defattr(-,root,root,-)
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/prelude-lml.h
%{_includedir}/%{name}/%{name}.h
%files selinux
%files -n %{name}-selinux
%{_datadir}/selinux/targeted/%{name}.pp.bz2
%changelog