PKGBUILD 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Contributor: André Silva <emulatorman@hyperbola.info>
  3. # Contributor: Márcio Silva <coadde@hyperbola.info>
  4. # Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
  5. pkgname=linux-libre-firmware
  6. pkgver=1.3.1
  7. pkgrel=2
  8. epoch=1
  9. pkgdesc='Firmware files for Linux-libre'
  10. arch=(any)
  11. url='https://jxself.org/firmware'
  12. license=(GPL3)
  13. makedepends=(arm-linux-gnueabi-gcc # av7110
  14. arm-none-eabi-gcc # aica
  15. avr-gcc avr-libc dfu-util # atusb
  16. sh-elf-gcc sh-elf-newlib cmake # carl9170fw
  17. xtensa-elf-gcc # ath9k_htc
  18. )
  19. optdepends=('dfu-util: to flash the atusb firmware')
  20. provides=(linux-firmware)
  21. conflicts=(linux-firmware
  22. linux-firmware-git
  23. kernel26-firmware
  24. ar9170-fw
  25. iwlwifi-1000-ucode
  26. iwlwifi-3945-ucode
  27. iwlwifi-4965-ucode
  28. iwlwifi-5000-ucode
  29. iwlwifi-5150-ucode
  30. iwlwifi-6000-ucode
  31. rt2870usb-fw
  32. rt2x00-rt61-fw
  33. rt2x00-rt71w-fw
  34. openfwwf
  35. ath9k-htc-firmware)
  36. replaces=(${conflicts[@]})
  37. options=(!buildflags !makeflags)
  38. source=(
  39. "$url/$pkgname-$pkgver.tar.lz"{,.asc}
  40. 0001-Update-carl9170-to-latest-upstream.patch
  41. 0002-Add-firmware-for-the-ATUSB-IEEE-802.15.4-USB-Adapter.patch
  42. 0003-Update-INSTALL-document.patch
  43. 0004-atusb-Build-updates.patch
  44. 0006-Makefile-Change-spaces-for-atusb-to-tab.patch
  45. 0007-Makefile-Add-atusb-to-all.patch
  46. 0008-Makefile-Set-shell-to-bin-bash.patch
  47. )
  48. sha512sums=('d827ec7024b4900dcdf6af8cdd4e72b02596d0ade5c2262460cd573785300498e6aa655b9a59cd22e38a6a787826a564ae33acfac52e68df1d082445e66f18df'
  49. 'SKIP'
  50. '07263a406cb15c9f91f41c8fb6d4307875665b8106adf526353d64306611458e11ce311842caa9efa623091c897ec9f87cfe54584c9c47590195867958cf4086'
  51. 'a4e8752cfee8dfd0b17ff798d2b5ea7a773ebcf688f7614d1c1a92fe7f092c626a289069a472bc873a77c9cf52f1e37953b0ba47c37a9dfb2a763a695ca77625'
  52. '1665ce62de148383fe4f30aa5714ef6bb1dfd4eed110415995069830b36a4b1aafb05e4cd6cf428dc0817e2affb91740e41b3fab8d2385683d6c18790bbf5afd'
  53. '0168ba0f3a8f3938a96b7f72d081283ca04b7ba90c5474d8ccf0716d6964137980f49623c5489271158a48827319a20ee4f19bd94f5bb956ee97d5ba637070c1'
  54. 'fa006627935beb7ae78fad5b63423a54e4eae384761ff618fff173250fb5d0c7eef9d5a707733d037edc95259ef59c9053c4245b80a004928b6809ea1cb43cf8'
  55. '8014d9eccb4c5193d1b4b056e163b5631c207adc78522e413650eb053c90e7b9e333c9e5cb6f73b63985e27020f4c69e7b791176702c55f711f6db95387e6bff'
  56. '59560f16978b2fd7d8c828d7609ee4f71cbdc902b70cfb87feca686958dd4df05c61c5e1bfa5e0c2a060f23185a0b9e5d07d487e172764767cdc4b26a6240b79')
  57. validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198') # Jason Self
  58. prepare(){
  59. cd $pkgname-$pkgver/src
  60. local src
  61. for src in "${source[@]}"; do
  62. src="${src%%::*}"
  63. src="${src##*/}"
  64. [[ $src = *.patch ]] || continue
  65. echo "Applying patch $src..."
  66. patch -Np1 < "$srcdir/$src"
  67. done
  68. # Use our cross compilers and build carl9170fw with the default config
  69. sed -e 's|$PWD/../toolchain/inst/bin/||g' \
  70. -e 's|${CMAKE_SOURCE_DIR}/toolchain/inst/bin/||g' \
  71. -e '/CMAKE_FIND_ROOT_PATH/d' \
  72. -e 's/: ath9k_htc_toolchain$/:/' \
  73. -e 's/: carl9170fw-toolchain$/:/' \
  74. -e '/cd carl9170fw && .\/autogen.sh$/ s/$/ --alldefconfig/' \
  75. -i Makefile \
  76. ath9k_htc/target_firmware/configure \
  77. carl9170fw/extra/sh-elf-linux.cmake
  78. }
  79. build(){
  80. make -C $pkgname-$pkgver/src
  81. }
  82. package(){
  83. cd $pkgname-$pkgver/src
  84. make prefix=$pkgdir/usr/lib/firmware install
  85. install -Dm644 WHENCE $pkgdir/usr/share/licenses/$pkgname/WHENCE
  86. }