mcelog/mcelog.spec
OBS User autobuild d4c5115ba8 Accepting request 29009 from Base:System
Copy from Base:System/mcelog based on submit request 29009 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29009
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mcelog?expand=0&rev=7
2010-01-12 15:13:00 +00:00

93 lines
2.3 KiB
RPMSpec

#
# spec file for package mcelog (Version 1.0pre1)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: mcelog
License: GPLv2+
Summary: Log Machine Check Events
Version: 1.0pre1
Release: 1
AutoReqProv: on
ExclusiveArch: x86_64
PreReq: %insserv_prereq
Source: mcelog-%{version}.tar.bz2
Source1: mcelog.service
Patch0: mcelog_daemon_create_pid_file.patch
Group: System/Monitoring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
mcelog retrieves machine check events from an x86-64 kernel in a cron
job, decodes them, and logs them to /var/log/mcelog.
A machine check event is a hardware error detected by the CPU.
It should run on any x86-64 system.
In addition, it allows decoding machine check kernel panic messages.
Authors:
--------
Andi Kleen <andi@firstfloor.org>
%prep
%setup
%patch0 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS"
%install
mkdir -p $RPM_BUILD_ROOT/usr/sbin/
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/mcelog
ln -s /etc/init.d/mcelog $RPM_BUILD_ROOT/usr/sbin/rcmcelog
install -m755 mcelog $RPM_BUILD_ROOT/usr/sbin
install -m644 mcelog.8 $RPM_BUILD_ROOT/%{_mandir}/man8
install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ -c /dev/mcelog ];then
%{insserv_force_if_yast mcelog}
fi
%preun
%stop_on_removal mcelog
%postun
%restart_on_update
%insserv_cleanup
%files
%defattr (-,root,root,755)
%{_mandir}/man8/*
/usr/sbin/mcelog
%config /etc/logrotate.d/mcelog
/etc/init.d/mcelog
/usr/sbin/rcmcelog
%changelog