diff --git a/mcelog.changes b/mcelog.changes index 276c301..902ada4 100644 --- a/mcelog.changes +++ b/mcelog.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 22 13:00:21 UTC 2013 - rmilasan@suse.com + +- Install mcelog.service accordingly (/usr/lib/systemd for 12.3 + and up or /lib/systemd for older versions). + ------------------------------------------------------------------- Thu Aug 16 14:41:55 UTC 2012 - trenn@suse.de diff --git a/mcelog.spec b/mcelog.spec index 19b1173..d856f7c 100644 --- a/mcelog.spec +++ b/mcelog.spec @@ -1,7 +1,7 @@ # # spec file for package mcelog # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 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 @@ -16,7 +16,6 @@ # - Name: mcelog Summary: Log Machine Check Events License: GPL-2.0+ @@ -36,6 +35,12 @@ Patch1: email.patch Patch2: mcelog_invert_prefill_db_warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %suse_version > 1220 +%define _unitdir /usr/lib/systemd +%else +%define _unitdir /lib/systemd +%endif + %description mcelog retrieves machine check events from an x86-64 kernel in a cron job, decodes them, and logs them to /var/log/mcelog. @@ -77,7 +82,7 @@ install -m 644 %SOURCE2 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mcelo mkdir -p $RPM_BUILD_ROOT/%_docdir/%name install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf -install -D -m 0644 %SOURCE3 %{buildroot}/lib/systemd/system/mcelog.service +install -D -m 0644 %SOURCE3 %{buildroot}%{_unitdir}/system/mcelog.service %clean rm -rf $RPM_BUILD_ROOT @@ -96,7 +101,6 @@ fi %files %defattr (-,root,root,755) -/lib/systemd/system/mcelog.service %{_mandir}/man8/* /usr/sbin/mcelog %config /etc/logrotate.d/mcelog @@ -106,6 +110,9 @@ fi /var/adm/fillup-templates/sysconfig.mcelog /etc/mcelog/*trigger /usr/sbin/rcmcelog +%dir %{_unitdir} +%dir %{_unitdir}/system +%{_unitdir}/system/mcelog.service %_docdir/%name %changelog