PKGBUILD 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Maintainer (arch): Bruno Pagani <archange@archlinux.org>
  2. # Maintainer (arch): Daniel Bermond <dbermond@archlinux.org>
  3. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  4. # Contributor: bill-auger <bill-auger@programmer.net>
  5. # parabola changes and rationale:
  6. # - delete non-free binaries/shaders
  7. pkgname=intel-media-driver
  8. pkgver=24.1.3
  9. pkgrel=1
  10. _parabola_rev+=parabola1
  11. pkgrel+=.${_parabola_rev}
  12. pkgdesc="Intel Media Driver for VAAPI — Broadwell+ iGPUs"
  13. arch=(x86_64)
  14. url="https://github.com/intel/media-driver/"
  15. license=(custom:MIT custom:BSD)
  16. depends=(gcc-libs intel-gmmlib libva)
  17. makedepends=(cmake)
  18. source=(${url}/archive/${pkgname%-*}-${pkgver}.tar.gz)
  19. source+=(debian-copyright::https://salsa.debian.org/multimedia-team/intel-media-driver/-/raw/master/debian/copyright)
  20. sha256sums=('a024e96abd662193e4295f427a76c5894087503df46bd82c0e5bea103e44b171')
  21. sha256sums+=('d343526be1a663ae4c3d8e9c21e31b1f9cef621e8ca188edcee9da54b9e1c488')
  22. validpgpkeys=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger
  23. # parabola mksource over-rides
  24. mksource=( ${source[*]} )
  25. mksha256sums=( ${sha256sums[*]} )
  26. source=(https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-${pkgver}-${_parabola_rev}.tar.gz{,.sig})
  27. sha256sums=('4dac4ac4502211896bf2bb5da0d20704947c1764834bd8d15144483f70a5a203'
  28. 'SKIP')
  29. mksource() {
  30. cd ${pkgname#*-}-${pkgname%-*}-${pkgver}
  31. local reading=false
  32. local nonfree_files=()
  33. # delete non-free files according to debian
  34. while IFS= read -r line
  35. do if [[ "${line}" =~ ^Files-Excluded: ]]
  36. then reading=true
  37. nonfree_files=( $(cut -d : -f 2 <<<${line}) )
  38. elif $reading && [[ -n "${line}" && "${line}" =~ ^[[:space:]] ]]
  39. then nonfree_files+=( ${line} )
  40. elif $reading
  41. then break
  42. else continue
  43. fi
  44. done < "${srcdir}"/debian-copyright
  45. echo "collected (${#nonfree_files[@]}) \$nonfree_files from 'debian-copyright'"
  46. for nonfree_file in ${nonfree_files[@]}
  47. do [[ "${nonfree_file}" =~ \.\. ]] || rm -v ./${nonfree_file}
  48. done
  49. }
  50. build() {
  51. local parabola_opts=( -DENABLE_NONFREE_KERNELS=OFF )
  52. cmake -B build -S ${pkgname#*-}-${pkgname%-*}-${pkgver} \
  53. -G 'Unix Makefiles' \
  54. -DCMAKE_INSTALL_PREFIX=/usr \
  55. -DCMAKE_INSTALL_LIBDIR=lib \
  56. -DINSTALL_DRIVER_SYSCONF=OFF \
  57. -DMEDIA_BUILD_FATAL_WARNINGS=OFF \
  58. ${parabola_opts[*]} \
  59. -Wno-dev
  60. cmake --build build
  61. }
  62. package() {
  63. DESTDIR="${pkgdir}" cmake --install build
  64. install -Dm644 ${pkgname#*-}-${pkgname%-*}-${pkgver}/LICENSE.md -t "${pkgdir}"/usr/share/licenses/${pkgname}/
  65. }