Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 6d539a0f99a6b047979d341bdc06c24c > files > 4

microcode_ctl-1.06-10mdk.src.rpm

Summary:   Intel P6 CPU Microcode Utility
Name:      microcode_ctl
Version:   1.06
Release:   10mdk
Group:     System/Kernel and hardware
License:   GPL
Url:       http://www.urbanmyth.org/microcode/
Source:    %name-%version.tar.bz2
Source1:   %name
Patch1:    microcode_ctl-build.diff.bz2
Buildroot: %_tmppath/%name-%version-buildroot
ExclusiveArch: %ix86
BuildRequires: kernel-source

%description
Since PentiumPro, Intel CPU are made of a RISC chip and of a microcode whose
purpose is to decompose "old" ia32 instruction into new risc ones.
P6 familly is concerned: PPro, PII, Celeron, PIII, Celeron2.
Recent kernels have the ability to update this microcode.

The microcode update is volatile and needs to be uploaded on each system
boot. I.e. it doesn't reflash your cpu permanently.
Reboot and it reverts back to the old microcode.

%prep
%setup -q
%patch1 -p0

%build
make

%install
%makeinstall DESTDIR=$RPM_BUILD_ROOT PREFIX=%_prefix MANDIR=%_mandir/man8
mkdir -p $RPM_BUILD_ROOT/%_initrddir
install -m 755 %SOURCE1 $RPM_BUILD_ROOT/%_initrddir
rm -f %buildroot%_sysconfdir/init.d/microcode_ctl
mkdir -p $RPM_BUILD_ROOT/etc/devfs/conf.d
cat > $RPM_BUILD_ROOT/etc/devfs/conf.d/microcode.conf <<EOF
REGISTER ^misc/microcode$ CFUNCTION GLOBAL  mksymlink ../misc/microcode cpu/microcode
UNREGISTER ^misc/microcode$ CFUNCTION GLOBAL unlink cpu/microcode
EOF

%clean
rm -r $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/etc/devfs/conf.d/microcode.conf
%_sbindir/microcode_ctl
%_mandir/man8/*
%config(noreplace) /etc/microcode.dat
%config(noreplace) %_initrddir/%name

%post
/sbin/chkconfig --add %{name}
	
%preun
[[ "$1" = "0" ]] && /sbin/chkconfig --del %name

%changelog
* Tue Jun 08 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-10mdk
- fix typo in description (Eskild Hustvedt)

* Tue Jun 08 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-9mdk
- fix microcode update on 2.6.x with devfs (anthill #897)

* Thu Oct  9 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-8mdk
- spec fixes
- it's x86-only

* Fri Apr 25 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-7mdk
- fix buildrequires (thanks to the bot from Stefan van der Eijk)

* Tue Mar 11 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-6mdk
- fix build

* Fri Mar 22 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-5mdk
- more macros use
- simplify %%preun

* Mon Feb 25 2002 Götz Waschk <waschk@linux-mandrake.com> 1.06-4mdk
- fix init script, thanks to DUCLOS Andre <shirka@wanadoo.fr>

* Mon Feb 18 2002 Götz Waschk <waschk@linux-mandrake.com> 1.06-3mdk
- update init script, load microcode module for devfs users

* Fri Oct 12 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-2mdk
- happy birthday, mister rpmlint

* Tue Aug 21 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.06-1mdk
- updated to 1.06

* Thu Mar 22 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.04-1mdk
- new version

* Wed Feb 28 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.03-1mdk
- Initial RPM