PKGBUILD 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # Maintainer: Noah Vogt (noahvogt) <noah@noahvogt.com>
  2. # Maintainer: Seppia <seppia@seppio.fish>
  3. # Maintainer: JustKidding <jk@vin.ovh>
  4. # Based on aur/chromium-vaapi, with ungoogled-chromium patches
  5. # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
  6. # Contributor: Pierre Schmitz <pierre@archlinux.de>
  7. # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
  8. # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
  9. pkgname=ungoogled-chromium-xdg-bin
  10. pkgver=101.0.4951.64
  11. pkgrel=1
  12. _launcher_ver=8
  13. pkgdesc="A lightweight approach to removing Google web service dependency - without creating a useless ~/.pki directory (binary version)"
  14. arch=('x86_64')
  15. url="https://github.com/Eloston/ungoogled-chromium"
  16. license=('BSD')
  17. depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
  18. 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
  19. 'desktop-file-utils' 'hicolor-icon-theme')
  20. makedepends=()
  21. optdepends=('pipewire: WebRTC desktop sharing under Wayland'
  22. 'kdialog: support for native dialogs in Plasma'
  23. 'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
  24. 'kwallet: support for storing passwords in KWallet on Plasma')
  25. options=('!lto') # Chromium adds its own flags for ThinLTO
  26. source=(https://github.com/noahvogt/${pkgname%-*}-aur/releases/download/$pkgver-$pkgrel/$pkgname-$pkgver.tar.gz
  27. index.html)
  28. sha256sums=('9d194b4d0dc81b48803b84734a11a67271161e40feaff182ca12a82f20d94baa'
  29. 'a4cdd2b86f32d5302c2792be841ff40d982b19bb58a4e63df9d77f4c706b8665')
  30. provides=('chromium')
  31. conflicts=('chromium')
  32. # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
  33. # Keys are the names in the above script; values are the dependencies in Arch
  34. declare -gA _system_libs=(
  35. [ffmpeg]=ffmpeg
  36. [flac]=flac
  37. [fontconfig]=fontconfig
  38. [freetype]=freetype2
  39. [harfbuzz-ng]=harfbuzz
  40. [icu]=icu
  41. [libdrm]=
  42. [libjpeg]=libjpeg
  43. [libpng]=libpng
  44. #[libvpx]=libvpx
  45. [libwebp]=libwebp
  46. [libxml]=libxml2
  47. [libxslt]=libxslt
  48. [opus]=opus
  49. [re2]=re2
  50. [snappy]=snappy
  51. [zlib]=minizip
  52. )
  53. _unwanted_bundled_libs=(
  54. $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
  55. )
  56. depends+=(${_system_libs[@]})
  57. package() {
  58. cd "$pkgname/chromium-launcher-$_launcher_ver"
  59. make PREFIX=/usr DESTDIR="$pkgdir" install
  60. install -Dm644 LICENSE \
  61. "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
  62. cd "../src"
  63. install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
  64. install -D out/Release/chromedriver "$pkgdir/usr/bin/chromedriver"
  65. install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
  66. install -Dm644 ../chromium-drirc-disable-10bpc-color-configs.conf \
  67. "$pkgdir/usr/share/drirc.d/10-$pkgname.conf"
  68. install -Dm644 chrome/installer/linux/common/desktop.template \
  69. "$pkgdir/usr/share/applications/chromium.desktop"
  70. install -Dm644 chrome/app/resources/manpage.1.in \
  71. "$pkgdir/usr/share/man/man1/chromium.1"
  72. sed -i \
  73. -e 's/@@MENUNAME@@/Chromium/g' \
  74. -e 's/@@PACKAGE@@/chromium/g' \
  75. -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
  76. "$pkgdir/usr/share/applications/chromium.desktop" \
  77. "$pkgdir/usr/share/man/man1/chromium.1"
  78. install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
  79. "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
  80. sed -ni \
  81. -e 's/chromium-browser\.desktop/chromium.desktop/' \
  82. -e '/<update_contact>/d' \
  83. -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
  84. -e '/^<?xml/,$p' \
  85. "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
  86. local toplevel_files=(
  87. chrome_100_percent.pak
  88. chrome_200_percent.pak
  89. chrome_crashpad_handler
  90. resources.pak
  91. v8_context_snapshot.bin
  92. # ANGLE
  93. libEGL.so
  94. libGLESv2.so
  95. # SwiftShader ICD
  96. libvk_swiftshader.so
  97. vk_swiftshader_icd.json
  98. )
  99. #if [[ -z ${_system_libs[icu]+set} ]]; then
  100. # toplevel_files+=(icudtl.dat)
  101. #fi
  102. echo "${toplevel_files[@]}"
  103. cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
  104. install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
  105. install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so
  106. for size in 24 48 64 128 256; do
  107. install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
  108. "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
  109. done
  110. for size in 16 32; do
  111. install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
  112. "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
  113. done
  114. install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
  115. install -Dm644 "../../../index.html" "$pkgdir/usr/share/ungoogled-chromium/index.html"
  116. }
  117. # vim:set ts=2 sw=2 et: