core/intel-ucode/PKGBUILD

39 lines
1.5 KiB
Bash

# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/intel-ucode
pkgname=intel-ucode
pkgver=20180703
# Some random "download id" that intel has in their downloadcenter
_dlid=27945
pkgrel=2
pkgdesc="Microcode update files for Intel CPUs"
arch=('x86_64')
install=$pkgname.install
url="https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&keyword=processor%20microcode%20data%20file"
replaces=('microcode_ctl')
makedepends=('iucode-tool')
license=('custom')
source=(https://downloadmirror.intel.com/${_dlid}/eng/microcode-${pkgver}.tgz
LICENSE)
sha256sums=('4a1a346fdf48e1626d4c9d0d47bbbc6a4052f56e359c85a3dd2d10fd555e5938'
'6983e83ec10c6467fb9101ea496e0443f0574c805907155118e2c9f0bbea97b6')
build() {
cd "$srcdir"
rm -f intel-ucode{,-with-caveats}/list
mkdir -p kernel/x86/microcode
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode{,-with-caveats}/
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > intel-ucode.img
}
package() {
# for packagers who want to update:
# We don't use same method as arch linux for microcode
# copy it to /usr/lib/firmware/intel-ucode/ is the right way to go for chakra
cd "$srcdir"
install -d -m755 "${pkgdir}"/usr/lib/firmware/intel-ucode/
cp intel-ucode/* "${pkgdir}"/usr/lib/firmware/intel-ucode/
install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}