Advertisement
Guest User

Untitled

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