PKGBUILD 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. pkgbase=linux-libre-firmware
  3. pkgname=(linux-libre-firmware{,-whence})
  4. pkgver=1.4
  5. pkgrel=2
  6. epoch=1
  7. pkgdesc='Firmware files for Linux-libre'
  8. arch=(any)
  9. url='https://jxself.org/firmware'
  10. license=(GPL3)
  11. makedepends=(
  12. arm-linux-gnueabi-gcc # av7110
  13. arm-none-eabi-gcc # aica
  14. avr-gcc avr-libc dfu-util # atusb
  15. sh-elf-gcc sh-elf-newlib cmake # carl9170fw
  16. xtensa-elf-gcc # ath9k_htc
  17. )
  18. options=(!buildflags !makeflags)
  19. source=("$url/$pkgbase-$pkgver.tar.lz"{,.asc})
  20. sha512sums=('3b4c8afb63c55f05df0b2686459c6bb2c0cb56db8384d5527506ff4a14b8de80e1a3037a9b57cccccd6953d869c6a71a6500c4c7b735253ea0b57c79854d9457'
  21. 'SKIP')
  22. validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198') # Jason Self <j@jxself.org>
  23. prepare() {
  24. cd "$pkgbase-$pkgver/src"
  25. # Use our cross compilers
  26. sed -e 's|$PWD/../toolchain/inst/bin/||g' \
  27. -i ath9k_htc/target_firmware/configure
  28. sed -e 's|${CMAKE_SOURCE_DIR}/toolchain/inst/bin/||g' \
  29. -e '/CMAKE_FIND_ROOT_PATH/d' \
  30. -i carl9170fw/extra/sh-elf-linux.cmake
  31. # Remove toolchains and build carl9170fw with the default config
  32. sed -e 's/: ath9k_htc_toolchain$/:/' \
  33. -e 's/: carl9170fw-toolchain$/:/' \
  34. -e '/cd carl9170fw && .\/autogen.sh$/ s/$/ --alldefconfig/' \
  35. -i Makefile
  36. }
  37. build() {
  38. make -C "$pkgbase-$pkgver/src"
  39. }
  40. package_linux-libre-firmware() {
  41. provides=(linux-firmware)
  42. conflicts=(
  43. linux-firmware
  44. linux-firmware-git
  45. linux-firmware-bnx2x
  46. linux-firmware-liquidio
  47. linux-firmware-marvell
  48. linux-firmware-mellanox
  49. linux-firmware-nfp
  50. linux-firmware-qcom
  51. linux-firmware-qlogic
  52. kernel26-firmware
  53. ar9170-fw
  54. iwlwifi-1000-ucode
  55. iwlwifi-3945-ucode
  56. iwlwifi-4965-ucode
  57. iwlwifi-5000-ucode
  58. iwlwifi-5150-ucode
  59. iwlwifi-6000-ucode
  60. rt2870usb-fw
  61. rt2x00-rt61-fw
  62. rt2x00-rt71w-fw
  63. openfwwf
  64. ath9k-htc-firmware
  65. )
  66. replaces=("${conflicts[@]}")
  67. optdepends=('dfu-util: to flash the atusb firmware')
  68. make -C "$pkgbase-$pkgver/src" prefix="$pkgdir/usr/lib/firmware" install
  69. }
  70. package_linux-libre-firmware-whence() {
  71. pkgdesc+=" - contains the WHENCE license file which documents the vendor license details"
  72. provides=(linux-firmware-whence)
  73. conflicts=(linux-firmware-whence)
  74. replaces=(linux-firmware-whence)
  75. cd "$pkgbase-$pkgver/src"
  76. install -Dm644 WHENCE "$pkgdir/usr/share/licenses/$pkgname/WHENCE"
  77. }