File salinfo.spec of Package salinfo

#
# spec file for package salinfo (Version 1.2)
#
# Copyright (c) 2008 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:           salinfo
Summary:        Decode IA64 SAL records
Version:        1.2
Release:        86
Group:          System/Daemons
License:        GPL v2 or later
PreReq:         %insserv_prereq %fillup_prereq
AutoReqProv:    on
Source:         salinfo-%{version}.tar.bz2
Patch:          salinfo-%{version}.diff
Source1:        rcsalinfo_decode
Source2:        sysconfig-salinfo
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  ia64

%description
The IA64 Linux kernel has a Software Abstraction Layer (SAL).  One of
SAL's tasks is to record machine problems such as CMC (correctable
machine checks), CPE (correctable platform errors), MCA (machine check
architecture) and INIT (cpu initialized after boot).  These records are
provided by SAL to user space.	salinfo saves and decodes CMC/CPE/MCA
and INIT records.



Authors:
--------
    Bjorn Helgaas <bjorn.helgaas@hp.com>

%prep
%setup -q
%patch

%build
make "CFLAGS=$RPM_OPT_FLAGS"

%install
make install prefix=$RPM_BUILD_ROOT mandir=%{_mandir} initdir=/etc/init.d
install -m 755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/salinfo_decode
mkdir -p $RPM_BUILD_ROOT/usr/sbin
ln -s /etc/init.d/salinfo_decode $RPM_BUILD_ROOT/usr/sbin/rcsalinfo_decode
mkdir -p $RPM_BUILD_ROOT/var/log/salinfo/raw/old $RPM_BUILD_ROOT/var/log/salinfo/decoded/old
rm -f $RPM_BUILD_ROOT/etc/sysconfig/salinfo_decode_all
rm -f $RPM_BUILD_ROOT/etc/init.d/salinfo_decode_all
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.salinfo

%post
%fillup_and_insserv -y salinfo_decode

%preun
%stop_on_removal salinfo_decode

%postun
%restart_on_update salinfo_decode
%insserv_cleanup

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
/etc/init.d/*
/etc/logrotate.d/*
/usr/sbin/*
/var/log/salinfo
%{_mandir}/man8/*.gz
/var/adm/fillup-templates/*

%changelog
* Wed Aug 13 2008 ro@suse.de
- added exclusivearch
* Mon Nov 26 2007 schwab@suse.de
- Fix open call.
* Thu Jul 05 2007 schwab@suse.de
- Fix file list.
* Thu Nov 02 2006 schwab@suse.de
- Update to salinfo 1.2.
  * Add 'dp' bit (Data poisoned on MBE).
  * Do not create new files when logrotating old salinfo records.
* Tue Sep 19 2006 schwab@suse.de
- Redirect output of daemon.
* Fri Mar 31 2006 schwab@suse.de
- Update sysconfig defaults.
* Wed Feb 15 2006 schwab@suse.de
- Update to salinfo 1.1.
  * Shutdown properly.
  * Sensible defaults for MCA and INIT rate limiting.
  * Detect and drop duplicate records.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 18 2006 schwab@suse.de
- Update to salinfo 1.0.
* Sat Nov 05 2005 schwab@suse.de
- Remove logrotate script.
* Fri Oct 14 2005 schwab@suse.de
- Fix aliasing problems.
* Fri Oct 08 2004 schwab@suse.de
- Update to salinfo 0.7 [#46848].
* Mon Jul 19 2004 schwab@suse.de
- Fix typo in specfile that causes the wrong file to be installed
  as logrotate script [#43105].
* Sat Mar 27 2004 schwab@suse.de
- Package created.