void-packages/srcpkgs/linux-firmware/template
2021-11-04 14:30:58 -03:00

110 lines
3 KiB
Bash

# Template file for 'linux-firmware'
pkgname=linux-firmware
version=20211027
revision=1
depends="${pkgname}-amd>=${version}_${revision} ${pkgname}-network>=${version}_${revision}"
short_desc="Binary firmware blobs for the Linux kernel"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="See /usr/share/licenses/${pkgname}"
homepage="https://www.kernel.org/"
distfiles="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/${pkgname}-${version}.tar.gz"
checksum=7667d054faed0cc07c3dfc858503987b21e7cfb4ba44368e3e138c8ea87859d9
python_version=3
nostrip=yes
subpackages="linux-firmware-amd linux-firmware-broadcom
linux-firmware-intel linux-firmware-nvidia linux-firmware-network
linux-firmware-qualcomm"
do_install() {
make install FIRMWAREDIR=/usr/lib/firmware DESTDIR=$DESTDIR
for _l in LICEN* WHENCE
do
vlicense "$_l"
done
# XXX: should some firmwares, like carl9170, be pruned?
}
linux-firmware-amd_package() {
short_desc+=" - AMD CPU/GPU microcode"
nostrip=yes
pkg_install() {
vmove usr/lib/firmware/amd*
vmove usr/lib/firmware/radeon
vmove usr/share/licenses/linux-firmware/LICENSE.amdgpu
vmove usr/share/licenses/linux-firmware/LICENSE.amd-ucode
vmove usr/share/licenses/linux-firmware/LICENSE.radeon
}
}
linux-firmware-broadcom_package() {
short_desc+=" - Broadcom network blobs"
nostrip=yes
replaces="rpi-firmware-network>=0"
pkg_install() {
vmove usr/lib/firmware/brcm
vmove usr/share/licenses/linux-firmware/LICENCE.broadcom_bcm43xx
# firmware/brcm contains multiple symlinks to ../cypress/
vmove usr/lib/firmware/cypress
vmove usr/share/licenses/linux-firmware/LICENCE.cypress
}
}
linux-firmware-intel_package() {
short_desc+=" - Intel CPU/GPU microcode"
nostrip=yes
pkg_install() {
vmove usr/lib/firmware/i915
vmove usr/share/licenses/linux-firmware/LICENSE.i915
}
}
linux-firmware-nvidia_package() {
short_desc+=" NVIDIA GPU microcode"
nostrip=yes
pkg_install() {
vmove usr/lib/firmware/nvidia
vmove usr/share/licenses/linux-firmware/LICENCE.nvidia*
}
}
linux-firmware-network_package() {
short_desc+=" - network"
depends="linux-firmware-broadcom>=${version}_${revision}"
case "$XBPS_TARGET_MACHINE" in
armv7*|aarch64*)
depends+=" linux-firmware-qualcomm>=${version}_${revision}"
;;
esac
nostrip=yes
pkg_install() {
vmove usr/lib/firmware/3com
vmove usr/lib/firmware/RTL8192E
vmove "usr/lib/firmware/rt*"
vmove "usr/lib/firmware/ath*"
vmove "usr/lib/firmware/ar*"
vmove "usr/lib/firmware/bnx2*"
vmove "usr/lib/firmware/cxgb*"
vmove "usr/lib/firmware/htc*"
vmove "usr/lib/firmware/iwl*"
vmove "usr/lib/firmware/intel*"
vmove usr/lib/firmware/kaweth
vmove usr/lib/firmware/libertas
vmove usr/lib/firmware/mrvl
vmove "usr/lib/firmware/mt*.bin"
vmove usr/lib/firmware/ueagle-atm
vmove usr/lib/firmware/ti-connectivity
vmove usr/lib/firmware/dpaa2
vmove usr/lib/firmware/qca
}
}
linux-firmware-qualcomm_package() {
short_desc+=" - Qualcomm SoC blobs"
nostrip=yes
pkg_install() {
vmove usr/lib/firmware/qcom
}
}