Advertisement
Guest User

Untitled

a guest
Jan 18th, 2022
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. # Maintainer: Yurii Kolesnykov <root@yurikoles.com>
  2. # Based on [extra]'s thunderbird by Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
  3.  
  4. pkgname=thunderbird-beta
  5. _pkgname=thunderbird
  6. _pkgver=97.0
  7. _beta=2
  8. pkgver="${_pkgver}b${_beta}"
  9. pkgrel=1
  10. pkgdesc='Standalone mail and news reader from mozilla.org — Beta version'
  11. url='https://www.mozilla.org/thunderbird/'
  12. arch=(x86_64)
  13. license=(MPL GPL LGPL)
  14. depends=(
  15. glibc gtk3 libgdk-3.so libgtk-3.so mime-types dbus libdbus-1.so dbus-glib
  16. alsa-lib nss hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 libbz2.so
  17. botan libwebp libwebp.so libwebpdemux.so libevent libjpeg-turbo libffi
  18. libffi.so nspr gcc-libs libx11 libxrender libxfixes libxext libxcomposite
  19. libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 icu libicui18n.so
  20. libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2
  21. libglib-2.0.so pixman libpixman-1.so gnupg
  22. )
  23. makedepends=(
  24. unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse
  25. xorg-server-xvfb autoconf2.13 rust clang llvm cbindgen nodejs
  26. gawk perl findutils libotr
  27. )
  28. optdepends=(
  29. 'libcanberra: sound support'
  30. 'libotr: OTR support for active one-to-one chats'
  31. )
  32. options=(!emptydirs !makeflags)
  33. provides=("thunderbird=$pkgver")
  34. conflicts=('thunderbird' 'thunderbird-beta-bin')
  35. source=(http://archive.mozilla.org/pub/thunderbird/candidates/97.0b2-candidates/build1/source/thunderbird-$pkgver.source.tar.xz{,.asc}
  36. thunderbird-beta.desktop
  37. vendor-prefs.js
  38. distribution.ini
  39. mozconfig.cfg)
  40. validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
  41.  
  42. # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
  43. # Note: These are for Arch Linux use ONLY. For your own distribution, please
  44. # get your own set of keys. Feel free to contact foutrelis@archlinux.org for
  45. # more information.
  46. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
  47.  
  48. # Mozilla API keys (see https://location.services.mozilla.com/api)
  49. # Note: These are for Arch Linux use ONLY. For your own distribution, please
  50. # get your own set of keys. Feel free to contact heftig@archlinux.org for
  51. # more information.
  52. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
  53.  
  54. prepare() {
  55. cd $_pkgname-$_pkgver
  56.  
  57. echo "${noextract[@]}"
  58.  
  59. printf "%s" "$_google_api_key" >google-api-key
  60. printf "%s" "$_mozilla_api_key" >mozilla-api-key
  61. cp ../mozconfig.cfg .mozconfig
  62. sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
  63. }
  64.  
  65. build() {
  66. cd $_pkgname-$_pkgver
  67. if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
  68. export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S")
  69. fi
  70. export MACH_USE_SYSTEM_PYTHON=1
  71. export MOZBUILD_STATE_PATH="${srcdir}/.mozbuild"
  72. ./mach configure
  73. ./mach build
  74. ./mach buildsymbols
  75. }
  76.  
  77. package() {
  78. cd $_pkgname-$_pkgver
  79. DESTDIR="$pkgdir" ./mach install
  80.  
  81. install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/${_pkgname}/defaults/pref"
  82. install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/${_pkgname}/distribution"
  83. install -Dm 644 ../thunderbird-beta.desktop -t "$pkgdir/usr/share/applications"
  84.  
  85. install -Dm 644 comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml \
  86. "$pkgdir/usr/share/metainfo/net.thunderbird.Thunderbird.appdata.xml"
  87.  
  88. for i in 16 22 24 32 48 64 128 256; do
  89. install -Dm644 comm/mail/branding/thunderbird/default${i}.png \
  90. "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/${_pkgname}.png"
  91. done
  92. install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \
  93. "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
  94.  
  95. # Use system-provided dictionaries
  96. ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/${_pkgname}/dictionaries"
  97. ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/${_pkgname}/hyphenation"
  98.  
  99. # Install a wrapper to avoid confusion about binary path
  100. install -Dm755 /dev/stdin "$pkgdir/usr/bin/${_pkgname}" <<END
  101. #!/bin/sh
  102. exec /usr/lib/${_pkgname}/thunderbird "\$@"
  103. END
  104.  
  105. # Replace duplicate binary with wrapper
  106. # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
  107. ln -srf "$pkgdir/usr/bin/${_pkgname}" \
  108. "$pkgdir/usr/lib/${_pkgname}/thunderbird-bin"
  109. }
  110.  
  111. sha256sums=('6d435361388b90d5da73bc9d3a7598b71ebe8f9eb5f28455271161e0ac604cdc'
  112. 'SKIP'
  113. '71251951e99d33c1bc56d8e1729270cb1c0bd026a86cd840b8ac9ac54a68d846'
  114. 'fa11b4736bbf53ec015f71cd42b1040b22d1a855c562b76927b3f0eccb925c85'
  115. 'bc3aae2cc00dc9806f54606f98d967366a2ba7223f6a3ad1c658a653ebff5569'
  116. '627d9a9619c145bf1198f08b894e8fc682451788bfdf693e14732d17111b8d81')
  117.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement