various fixes.
This commit is contained in:
parent
ec8303082f
commit
a570da6c24
35
mcelog.spec
35
mcelog.spec
@ -6,9 +6,7 @@ Serial: 1
|
||||
Group: System Environment/Base
|
||||
License: GPL
|
||||
Source0: mcelog-0.3.tar.gz
|
||||
Source1: mcelog.init
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
Prereq: /sbin/chkconfig /sbin/service
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
%description
|
||||
@ -21,11 +19,8 @@ ftp://ftp.x86-64.org/pub/linux/tools/mcelog/
|
||||
|
||||
%build
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p %{buildroot}/usr/sbin
|
||||
mkdir -p %{buildroot}/usr/man
|
||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
||||
mkdir -p %{buildroot}/etc/sysconfig
|
||||
mkdir -p %{buildroot}/usr/share/man
|
||||
|
||||
cd mcelog-0.3
|
||||
make CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -33,38 +28,24 @@ cd ..
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
||||
|
||||
cd mcelog-0.3
|
||||
|
||||
make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} \
|
||||
INSDIR=/sbin MANDIR=%{_mandir}/man8 RCDIR=/etc MICDIR=/etc/firmware install clean
|
||||
|
||||
install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/mcelog
|
||||
install mcelog %{buildroot}/usr/sbin/mcelog
|
||||
install mcelog.cron %{buildroot}/etc/cron.daily/mcelog.cron
|
||||
cp mcelog.8 %{buildroot}/usr/share/man/man8
|
||||
rm %{buildroot}/etc/init.d/mcelog
|
||||
cd ..
|
||||
|
||||
chmod -R a-s %{buildroot}
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/etc/rc.d/init.d/microcode_ctl
|
||||
/sbin/mcelog
|
||||
/usr/sbin/mcelog
|
||||
/etc/cron.daily/mcelog.cron
|
||||
%attr(0644,root,root) %{_mandir}/*/*
|
||||
|
||||
%preun
|
||||
if [ "$1" = "0" ] ; then
|
||||
/sbin/chkconfig --del mcelog
|
||||
fi
|
||||
|
||||
%post
|
||||
# Only enable on AMD CPUs for now.
|
||||
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
|
||||
[ "$vendor" != "AuthenticAMD" ] && exit 0
|
||||
/sbin/chkconfig --add mcelog
|
||||
|
||||
%changelog
|
||||
* Thu Jan 27 2005 Dave Jones <davej@redhat.com>
|
||||
- Initial packaging, based upon kernel-utils.
|
||||
- Initial packaging.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user