forked from grondo/edac-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
edac-utils.spec
73 lines (60 loc) · 1.69 KB
/
edac-utils.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Name: edac-utils
Version: See META
Release: See META
Summary: Userspace helper for kernel EDAC drivers (ECC)
Group: Applications/System
License: GPL
Source: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}
%{?el5:%define _with_libsysfs 1}
%{?el6:%define _with_libsysfs 1}
%if 0%{?_with_libsysfs}
BuildRequires: libsysfs-devel
Requires: libsysfs
%else
BuildRequires: sysfsutils-devel
Requires: sysfsutils
%endif
%define debug_package %{nil}
%description
EDAC is the current set of drivers in the Linux kernel that handle
detection of ECC errors from memory controllers for most chipsets
on i386 and x86_64 architectures. This userspace component consists
an init script which loads EDAC DIMM labels at system boot, and can
optionally be configured to load a specific EDAC driver if this is
not done automatically at system startup. The package also includes a
library and utility for reporting current error counts from the EDAC
sysfs files.
%prep
%setup
%build
%configure
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
%install
rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"
DESTDIR="$RPM_BUILD_ROOT" make install
# Create labels.d dir
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/edac/labels.d
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
if [ $1 = 1 ]; then
/sbin/chkconfig --add edac
fi
%preun
if [ $1 = 0 ]; then
/sbin/chkconfig --del edac
fi
%files
%defattr(-,root,root,0755)
%doc README NEWS DISCLAIMER
%{_sbindir}/edac-ctl
%{_bindir}/edac-util
%{_libdir}/*
%{_mandir}/*/*
%{_includedir}/edac.h
%dir %attr(0755,root,root) %{_sysconfdir}/edac
%dir %attr(0755,root,root) %{_sysconfdir}/edac/labels.d
%config(noreplace) %{_sysconfdir}/edac/labels.db
%{_sysconfdir}/init.d/edac