8da9c4
Name:		edac-utils
8da9c4
Version:	0.16
8da9c4
Release:	11%{?dist}
8da9c4
Summary:	Userspace helper for kernel EDAC drivers
8da9c4
8da9c4
Group:		System Environment/Base
8da9c4
License:	GPLv2+
8da9c4
URL:		http://sourceforge.net/projects/edac-utils/
8da9c4
8da9c4
ExclusiveArch:	%{ix86} x86_64 %{arm} aarch64 %{power64}
8da9c4
Source0:	http://dl.sourceforge.net/sourceforge/edac-utils/%{name}-%{version}.tar.bz2
8da9c4
Source1:	edac.service
8da9c4
Patch:		884477.patch
8da9c4
8da9c4
%ifarch %{ix86} x86_64
8da9c4
Requires:	dmidecode
8da9c4
%endif
8da9c4
Requires:	hwdata
8da9c4
Requires:	sysfsutils
8da9c4
BuildRequires:	libsysfs-devel, systemd-devel
8da9c4
Requires(post): systemd-units
8da9c4
Requires(preun): systemd-units
8da9c4
Requires(postun): systemd-units
8da9c4
8da9c4
%description 
8da9c4
EDAC is the current set of drivers in the Linux kernel that handle
8da9c4
detection of ECC errors from memory controllers for most chipsets
8da9c4
on i386 and x86_64 architectures. This userspace component consists
8da9c4
of an init script which makes sure EDAC drivers and DIMM labels
8da9c4
are loaded at system startup, as well as a library and utility
8da9c4
for reporting current error counts from the EDAC sysfs files.
8da9c4
8da9c4
%package devel
8da9c4
Summary:	Development files for %{name}
8da9c4
Group:		Development/Libraries
8da9c4
Requires:	%{name} = %{version}-%{release}
8da9c4
8da9c4
%description devel
8da9c4
This package contains the development headers and libraries
8da9c4
for %{name}.
8da9c4
8da9c4
%prep
8da9c4
%setup -q
8da9c4
%patch -p1
8da9c4
8da9c4
%build
8da9c4
%configure --disable-static
8da9c4
make %{?_smp_mflags} 
8da9c4
8da9c4
%install
8da9c4
make install-exec install-data DESTDIR="$RPM_BUILD_ROOT"
8da9c4
# Remove libtool archive
8da9c4
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
8da9c4
8da9c4
install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/edac.service
8da9c4
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/edac
8da9c4
8da9c4
%post
8da9c4
/sbin/ldconfig
8da9c4
if [ $1 -eq 1 ] ; then 
8da9c4
    # Initial installation 
8da9c4
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
8da9c4
fi
8da9c4
8da9c4
%preun
8da9c4
if [ $1 -eq 0 ] ; then
8da9c4
    # Package removal, not upgrade
8da9c4
    /bin/systemctl --no-reload disable edac.service > /dev/null 2>&1 || :
8da9c4
    /bin/systemctl stop edac.service > /dev/null 2>&1 || :
8da9c4
fi
8da9c4
8da9c4
%postun
8da9c4
/sbin/ldconfig
8da9c4
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
8da9c4
if [ $1 -ge 1 ] ; then
8da9c4
    # Package upgrade, not uninstall
8da9c4
    /bin/systemctl try-restart edac.service >/dev/null 2>&1 || :
8da9c4
fi
8da9c4
8da9c4
%triggerun -- edac-utils < 0.9-14
8da9c4
# Save the current service runlevel info
8da9c4
# User must manually run systemd-sysv-convert --apply edac
8da9c4
# to migrate them to systemd targets
8da9c4
/usr/bin/systemd-sysv-convert --save edac >/dev/null 2>&1 ||:
8da9c4
8da9c4
# Run these because the SysV package being removed won't do them
8da9c4
/sbin/chkconfig --del edac >/dev/null 2>&1 || :
8da9c4
/bin/systemctl try-restart edac.service >/dev/null 2>&1 || :
8da9c4
8da9c4
%files 
8da9c4
%defattr(-,root,root,-)
8da9c4
%doc COPYING README NEWS ChangeLog DISCLAIMER
8da9c4
%{_sbindir}/edac-ctl
8da9c4
%{_bindir}/edac-util
8da9c4
%{_libdir}/*.so.*
8da9c4
%{_mandir}/*/*
8da9c4
%dir %attr(0755,root,root) %{_sysconfdir}/edac
8da9c4
%config(noreplace) %{_sysconfdir}/edac/*
8da9c4
%{_unitdir}/edac.service
8da9c4
8da9c4
%files devel
8da9c4
%defattr(-,root,root,-)
8da9c4
%{_libdir}/*.so
8da9c4
%{_includedir}/edac.h
8da9c4
8da9c4
%changelog
8da9c4
* Fri Aug 22 2014 Aristeu Rozanski <aris@redhat.com> - 0.16-11
8da9c4
- Enable in all powerpc64 arches instead [1125491]
8da9c4
8da9c4
* Fri Aug 08 2014 Aristeu Rozanski <aris@redhat.com> - 0.16-10
8da9c4
- Enable ppc64le arch build [1125491]
8da9c4
8da9c4
* Tue Jun 03 2014 Aristeu Rozanski <aris@redhat.com> - 0.16-9
8da9c4
- Enable builds on aarch64 [967931]
8da9c4
8da9c4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.16-8
8da9c4
- Mass rebuild 2013-12-27
8da9c4
8da9c4
* Mon Jul 01 2013 Aristeu Rozanski <aris@redhat.com> - 0.16-7
8da9c4
- including missing file
8da9c4
8da9c4
* Mon Jul 01 2013 Aristeu Rozanski <aris@redhat.com> - 0.16-6
8da9c4
- build bump
8da9c4
8da9c4
* Mon Jul 01 2013 Aristeu Rozanski <aris@redhat.com> - 0.16-5
8da9c4
- fixed bogus dates in old changelog entries
8da9c4
- backported patch to fix library version mismatch [884477]
8da9c4
- included systemd-devel as BuildRequires for _unitdir rpm definition
8da9c4
8da9c4
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-4
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8da9c4
8da9c4
* Thu Oct 11 2012 Peter Robinson <pbrobinson@fedoraproject.org> 0.16-3
8da9c4
- ARM has support for EDAC so enable the utils
8da9c4
8da9c4
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8da9c4
8da9c4
* Wed May 02 2012 Aristeu Rozanski <aris@redhat.com> - 0.16-1
8da9c4
- New upstream release 0.16
8da9c4
8da9c4
* Wed Mar 14 2012 Jon Ciesla <limburgher@gmail.com> - 0.9-14
8da9c4
- Migrate to systemd, BZ 767784.
8da9c4
8da9c4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-13
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8da9c4
8da9c4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-12
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8da9c4
8da9c4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-11
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8da9c4
8da9c4
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-10
8da9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8da9c4
8da9c4
* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9-9
8da9c4
- fix license tag
8da9c4
8da9c4
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9-8
8da9c4
- Autorebuild for GCC 4.3
8da9c4
8da9c4
* Wed Jul 18 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-7
8da9c4
- including missing .patch file
8da9c4
8da9c4
* Tue Jul 17 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-6
8da9c4
- building FC7 package
8da9c4
8da9c4
* Mon Jul 09 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-5
8da9c4
- Fixed start/stop message, missing echo
8da9c4
- Fixed status command to use edac-util
8da9c4
8da9c4
* Fri Jun 15 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-4
8da9c4
- Removed debug code left by mistake on initrd file
8da9c4
- Fixed model comparing in edac-ctl script
8da9c4
8da9c4
* Wed Jun 13 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-3
8da9c4
- Adding COPYING to documents
8da9c4
- Fixing Requires to use a single equal sign, instead of two
8da9c4
8da9c4
* Wed Jun 13 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-2
8da9c4
- Multiple updates in spec file to conform to the standards pointed by
8da9c4
  Jarod Wilson
8da9c4
8da9c4
* Wed Jun 06 2007 Aristeu Rozanski <arozansk@redhat.com> 0.9-1
8da9c4
- Updated version to 0.9, separate project now
8da9c4
- Updated spec file based on upstream edac-utils spec file
8da9c4
- Removed driver loading portion in a separate patch, it'll be removed from
8da9c4
  upstream too
8da9c4
- Fixed init script to use functions and daemon function
8da9c4
8da9c4
* Thu Apr 19 2007 Aristeu Rozanski <arozansk@redhat.com> 20061222-3
8da9c4
- Updated initrd script to start after syslogd, otherwise if the board isn't
8da9c4
  supported, the user will never know.
8da9c4
8da9c4
* Thu Apr 19 2007 Aristeu Rozanski <arozansk@redhat.com> 20061222-2
8da9c4
- Changing this package to noarch and preventing the build on ia64, ppc64,
8da9c4
  s390 and s390x
8da9c4
8da9c4
* Mon Mar 12 2007 Aristeu Rozanski <arozansk@redhat.com> 20061222-1
8da9c4
- Package created
8da9c4