PKGBUILD 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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=105.0.5195.102
  11. pkgrel=2
  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=('671bf97a4d346a05e8487db35a843a2e87c28de6dad92f6c2e709bcef927319b'
  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. [brotli]=brotli
  36. [dav1d]=dav1d
  37. [ffmpeg]=ffmpeg
  38. [flac]=flac
  39. [fontconfig]=fontconfig
  40. [freetype]=freetype2
  41. [harfbuzz-ng]=harfbuzz
  42. [icu]=icu
  43. [jsoncpp]=jsoncpp
  44. [libaom]=aom
  45. [libavif]=libavif
  46. [libdrm]=
  47. [libjpeg]=libjpeg
  48. [libpng]=libpng
  49. #[libvpx]=libvpx
  50. [libwebp]=libwebp
  51. [libxml]=libxml2
  52. [libxslt]=libxslt
  53. [opus]=opus
  54. [re2]=re2
  55. [snappy]=snappy
  56. [woff2]=woff2
  57. [zlib]=minizip
  58. )
  59. _unwanted_bundled_libs=(
  60. $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
  61. )
  62. depends+=(${_system_libs[@]})
  63. package() {
  64. cd "$pkgname/chromium-launcher-$_launcher_ver"
  65. make PREFIX=/usr DESTDIR="$pkgdir" install
  66. install -Dm644 LICENSE \
  67. "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
  68. cd "../src"
  69. install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
  70. install -D out/Release/chromedriver "$pkgdir/usr/bin/chromedriver"
  71. install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
  72. install -Dm644 ../chromium-drirc-disable-10bpc-color-configs.conf \
  73. "$pkgdir/usr/share/drirc.d/10-$pkgname.conf"
  74. install -Dm644 chrome/installer/linux/common/desktop.template \
  75. "$pkgdir/usr/share/applications/chromium.desktop"
  76. install -Dm644 chrome/app/resources/manpage.1.in \
  77. "$pkgdir/usr/share/man/man1/chromium.1"
  78. sed -i \
  79. -e 's/@@MENUNAME@@/Chromium/g' \
  80. -e 's/@@PACKAGE@@/chromium/g' \
  81. -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
  82. "$pkgdir/usr/share/applications/chromium.desktop" \
  83. "$pkgdir/usr/share/man/man1/chromium.1"
  84. install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
  85. "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
  86. sed -ni \
  87. -e 's/chromium-browser\.desktop/chromium.desktop/' \
  88. -e '/<update_contact>/d' \
  89. -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
  90. -e '/^<?xml/,$p' \
  91. "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
  92. local toplevel_files=(
  93. chrome_100_percent.pak
  94. chrome_200_percent.pak
  95. chrome_crashpad_handler
  96. resources.pak
  97. v8_context_snapshot.bin
  98. # ANGLE
  99. libEGL.so
  100. libGLESv2.so
  101. # SwiftShader ICD
  102. libvk_swiftshader.so
  103. vk_swiftshader_icd.json
  104. )
  105. #if [[ -z ${_system_libs[icu]+set} ]]; then
  106. # toplevel_files+=(icudtl.dat)
  107. #fi
  108. echo "${toplevel_files[@]}"
  109. cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
  110. install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
  111. for size in 24 48 64 128 256; do
  112. install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
  113. "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
  114. done
  115. for size in 16 32; do
  116. install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
  117. "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
  118. done
  119. install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
  120. install -Dm644 "$srcdir/index.html" "$pkgdir/usr/share/ungoogled-chromium/index.html"
  121. }
  122. # vim:set ts=2 sw=2 et: