git » linux-firmware.git » main » tree

[main] / PKGBUILD

# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>

pkgbase=linux-firmware
pkgname=(linux-firmware)
_tag=20240709
pkgver=20240703.e94a2a3b
pkgrel=2
pkgdesc="Firmware files for Linux (ARMLFS set)"
url="https://gitlab.com/kernel-firmware/linux-firmware"
license=('GPL2' 'GPL3' 'custom')
arch=('any')
makedepends=('git' 'rdfind')
options=(!strip !debug)
source=("git+$url.git?signed#tag=${_tag}"
 WHENCE.armlfs)
sha256sums=('5504403f513abdcee95756a15fb5a1ac13231e50c0dcadeeff54d5fcc0d330f5' SKIP)
validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer <jwboyer@fedoraproject.org>

pkgver() {
  cd ${pkgbase}

  # Commit date + short rev
  echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  # The WHENCE files controls the install process, so overwriting it
  # allows us to cleanly pick the firmwares we want.
  #return 1
  cat WHENCE.armlfs > "${pkgbase}"/WHENCE
}

package_linux-firmware() {
  local _LICS=(
  WHENCE
  LICENCE.atheros_firmware
  LICENCE.open-ath9k-htc-firmware
  LICENCE.rtlwifi_firmware.txt
  LICENCE.NXP
  )

  cd ${pkgbase}

  ZSTD_CLEVEL=19 make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware install-zst

  install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${_LICS[@]}"

}


# vim:set sw=2 et: