Advertisement
Guest User

Untitled

a guest
Nov 26th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1. # Maintainer: Felix Golatofski <contact@xdfr.de>
  2. # Contributor: Det <nimetonmaili g-mail>
  3. # Contributor: Luna Jernberg <droidbittin@gmail.com>
  4. # Based on [extra]'s thunderbird: https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/thunderbird
  5.  
  6. pkgname=thunderbird-beta
  7. _pkgname=thunderbird
  8. _pkgver=84.0
  9. pkgver=84.0b2
  10. _major=${pkgver/[br]*}
  11. _build=${pkgver/*rc}
  12. pkgrel=1
  13. pkgdesc="Standalone mail and news reader from mozilla.org - Bleeding edge version"
  14. arch=(x86_64)
  15. license=(MPL GPL LGPL)
  16. url="https://www.mozilla.org/thunderbird/"
  17. depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib
  18. nss hunspell sqlite ttf-font icu)
  19. makedepends=(unzip zip diffutils python python2 yasm nasm mesa imake libpulse inetutils xorg-server-xvfb
  20. autoconf2.13 rust clang llvm gtk2 cbindgen nodejs)
  21. optdepends=('libcanberra: sound support')
  22. options=(!emptydirs !makeflags)
  23. provides=("thunderbird=$pkgver")
  24. conflicts=('thunderbird-beta-bin')
  25. install=$pkgname.install
  26. source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
  27. thunderbird-beta.desktop)
  28. sha512sums=('1fbe90404ce6999d4aa66d3e6c12b149db4aaa4ab68d28c7c5d64b649f5832998d6befa3b9bf47a482c3652096ab976317d8845540f72affc7f5e8bfab7226b7'
  29. 'SKIP'
  30. 'cab681d5acf17dd8dabf732c0bb5f73fd0444796bb4fd82decdfa8764122513fd2f05c562cf9246eacac67ea84ae85a220f59d7eea7106e0b2f6fc16bc520dd4')
  31.  
  32. validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
  33.  
  34. # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
  35. # Note: These are for Arch Linux use ONLY. For your own distribution, please
  36. # get your own set of keys. Feel free to contact foutrelis@archlinux.org for
  37. # more information.
  38. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
  39.  
  40. # Mozilla API keys (see https://location.services.mozilla.com/api)
  41. # Note: These are for Arch Linux use ONLY. For your own distribution, please
  42. # get your own set of keys. Feel free to contact heftig@archlinux.org for
  43. # more information.
  44. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
  45.  
  46. prepare() {
  47. cd $_pkgname-$_pkgver
  48.  
  49. echo -n "$_google_api_key" >google-api-key
  50. echo -n "$_mozilla_api_key" >mozilla-api-key
  51.  
  52. cat >.mozconfig <<END
  53. ac_add_options --enable-application=comm/mail
  54. ac_add_options --enable-calendar
  55.  
  56. ac_add_options --prefix=/usr
  57. ac_add_options --enable-release
  58. ac_add_options --enable-linker=gold
  59. ac_add_options --enable-hardening
  60. ac_add_options --enable-optimize
  61. # https://bugzilla.mozilla.org/show_bug.cgi?id=1521249
  62. #ac_add_options --enable-rust-simd
  63. # https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
  64. ac_add_options --disable-elf-hack
  65.  
  66. # Branding
  67. ac_add_options --with-branding=comm/mail/branding/nightly
  68. ac_add_options --enable-update-channel=nightly
  69. ac_add_options --with-distribution-id=org.archlinux
  70.  
  71. # System libraries
  72. ac_add_options --with-system-zlib
  73. ac_add_options --with-system-bz2
  74. ac_add_options --with-system-icu
  75. ac_add_options --with-system-jpeg
  76. # ac_add_options --with-system-libvpx
  77. ac_add_options --with-system-nspr
  78. ac_add_options --with-system-nss
  79. ac_add_options --enable-system-ffi
  80.  
  81. # Features
  82. ac_add_options --enable-alsa
  83. ac_add_options --disable-jack
  84. ac_add_options --enable-startup-notification
  85. ac_add_options --disable-crashreporter
  86. ac_add_options --disable-updater
  87. ac_add_options --disable-gconf
  88. END
  89. }
  90.  
  91. build() {
  92. cd $_pkgname-$_pkgver
  93. ./mach configure
  94. ./mach build
  95. ./mach buildsymbols
  96. }
  97.  
  98. package() {
  99. cd $_pkgname-$_pkgver
  100. DESTDIR="$pkgdir" ./mach install
  101.  
  102. _vendorjs="$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js"
  103. install -Dm644 /dev/stdin "$_vendorjs" <<END
  104. // Use LANG environment variable to choose locale
  105. pref("intl.locale.requested", "");
  106.  
  107. // Use system-provided dictionaries
  108. pref("spellchecker.dictionary_path", "/usr/share/hunspell");
  109.  
  110. // Disable default mailer checking.
  111. pref("mail.shell.checkDefaultMail", false);
  112.  
  113. // Don't disable our bundled extensions in the application directory
  114. pref("extensions.autoDisableScopes", 11);
  115. pref("extensions.shownSelectionUI", true);
  116. END
  117.  
  118. _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini"
  119. install -Dm644 /dev/stdin "$_distini" <<END
  120. [Global]
  121. id=archlinux
  122. version=1.0
  123. about=Mozilla Thunderbird for Arch Linux
  124.  
  125. [Preferences]
  126. app.distributor=archlinux
  127. app.distributor.channel=$pkgname
  128. app.partner.archlinux=archlinux
  129. END
  130.  
  131. for i in 16 22 24 32 48 64 128 256; do
  132. install -Dm644 comm/mail/branding/thunderbird/default${i}.png \
  133. "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png"
  134. done
  135. install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \
  136. "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
  137.  
  138. install -Dm644 ../$pkgname.desktop \
  139. "$pkgdir/usr/share/applications/$pkgname.desktop"
  140.  
  141. # Use system-provided dictionaries
  142. ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
  143. ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
  144.  
  145. # Install a wrapper to avoid confusion about binary path
  146. install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END
  147. #!/bin/sh
  148. exec /usr/lib/$pkgname/thunderbird "\$@"
  149. END
  150.  
  151. # Replace duplicate binary with wrapper
  152. # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
  153. ln -srf "$pkgdir/usr/bin/$pkgname" \
  154. "$pkgdir/usr/lib/$pkgname/thunderbird-bin"
  155. }
  156.  
  157.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement