void-packages/srcpkgs/intel-ucode/template

31 lines
1.1 KiB
Bash

# Template file for 'intel-ucode'
pkgname=intel-ucode
version=20191115
revision=2
archs="i686* x86_64*"
_wrksrc_base="Intel-Linux-Processor-Microcode-Data-Files-microcode"
wrksrc="${_wrksrc_base}-${version}"
short_desc="Microcode update files for Intel CPUs"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom: Proprietary"
homepage="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files"
distfiles="${homepage}/archive/microcode-${version}.tar.gz
${homepage}/archive/microcode-20190918.tar.gz"
checksum="14b26d27be70774948b8cb582e298f5317263b8b8bb1fe8e41260eae54f531dc
2b6b728d351764dfbf6a9763ac96ae7e04085f382a309fed3abc0118f094c943"
repository=nonfree
do_install() {
# Replace buggy 06-55-04 microcode with last known good version
_bad_ucode="intel-ucode/06-55-04"
rm "$_bad_ucode"
cp "../${_wrksrc_base}-20190918/$_bad_ucode" "$_bad_ucode"
# Rest of process continues as normal
vmkdir usr/lib/firmware/intel-ucode
vcopy "intel-ucode/*" usr/lib/firmware/intel-ucode
vmkdir usr/lib/dracut/dracut.conf.d
echo "early_microcode=yes" >> ${DESTDIR}/usr/lib/dracut/dracut.conf.d/intel_ucode.conf
vlicense license
}