# Maintainer: Levente Polyak # Contributor: Jan Alexander Steffens (heftig) # Contributor: Ionut Biru # Contributor: Alexander Baldeck # Contributor: Dale Blount # Contributor: Anders Bostrom # ALARM: Kevin Mihelich # - mozconfig changes for ARM # - disable rust lto for v7 highmem=1 pkgbase=thunderbird pkgname=(thunderbird) pkgver=91.7.0 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.mozilla.org/thunderbird/' arch=(x86_64) license=(MPL GPL LGPL) depends=( glibc gtk3 libgdk-3.so libgtk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 libbz2.so botan libwebp libwebp.so libwebpdemux.so libevent libjpeg-turbo libffi libffi.so nspr gcc-libs libx11 libxrender libxfixes libxext libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse xorg-server-xvfb autoconf2.13 rust clang llvm cbindgen nodejs gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch) validpgpkeys=( 14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases 4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases ) # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for # more information. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM # Mozilla API keys (see https://location.services.mozilla.com/api) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact heftig@archlinux.org for # more information. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff prepare() { cd $pkgname-$pkgver echo "${noextract[@]}" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done printf "%s" "$_google_api_key" >google-api-key printf "%s" "$_mozilla_api_key" >mozilla-api-key cp ../mozconfig.cfg .mozconfig sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig if [[ $CARCH == "armv7h" ]]; then echo "ac_add_options --disable-elf-hack" >> .mozconfig MAKEFLAGS="-j2" sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk fi echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig export MOZ_DEBUG_FLAGS=" " export CFLAGS+=" -g0" export CXXFLAGS+=" -g0" export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export RUSTFLAGS="-Cdebuginfo=0" } build() { cd $pkgname-$pkgver if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S") fi export MACH_USE_SYSTEM_PYTHON=1 ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( 'libotr: OTR support for active one-to-one chats' 'libnotify: Notification integration' ) cd $pkgname-$pkgver DESTDIR="$pkgdir" ./mach install install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/$pkgname/defaults/pref" install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/$pkgname/distribution" install -Dm 644 ../thunderbird.desktop -t "$pkgdir/usr/share/applications" install -Dm 644 comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml \ "$pkgdir/usr/share/metainfo/net.thunderbird.Thunderbird.appdata.xml" for i in 16 22 24 32 48 64 128 256; do install -Dm644 comm/mail/branding/thunderbird/default${i}.png \ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png" done install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" # Use system-provided dictionaries ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" # Install a wrapper to avoid confusion about binary path install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <=$pkgver") install -Dm644 thunderbird-i18n-$pkgver-$1.xpi \ "$pkgdir/usr/lib/thunderbird/extensions/langpack-$1@thunderbird.mozilla.org.xpi" } _languages=( 'af "Afrikaans"' 'ar "Arabic"' 'ast "Asturian"' 'be "Belarusian"' 'bg "Bulgarian"' 'br "Breton"' 'ca "Catalan"' 'cak "Kaqchikel"' 'cs "Czech"' 'cy "Welsh"' 'da "Danish"' 'de "German"' 'dsb "Lower Sorbian"' 'el "Greek"' 'en-GB "English (British)"' 'en-US "English (US)"' 'es-AR "Spanish (Argentina)"' 'es-ES "Spanish (Spain)"' 'et "Estonian"' 'eu "Basque"' 'fi "Finnish"' 'fr "French"' 'fy-NL "Frisian"' 'ga-IE "Irish"' 'gd "Gaelic (Scotland)"' 'gl "Galician"' 'he "Hebrew"' 'hr "Croatian"' 'hsb "Upper Sorbian"' 'hu "Hungarian"' 'hy-AM "Armenian"' 'id "Indonesian"' 'is "Icelandic"' 'it "Italian"' 'ja "Japanese"' 'ka "Georgian"' 'kab "Kabyle"' 'kk "Kazakh"' 'ko "Korean"' 'lt "Lithuanian"' 'ms "Malay"' 'nb-NO "Norwegian (Bokmål)"' 'nl "Dutch"' 'nn-NO "Norwegian (Nynorsk)"' 'pa-IN "Punjabi (India)"' 'pl "Polish"' 'pt-BR "Portuguese (Brazilian)"' 'pt-PT "Portuguese (Portugal)"' 'rm "Romansh"' 'ro "Romanian"' 'ru "Russian"' 'sk "Slovak"' 'sl "Slovenian"' 'sq "Albanian"' 'sr "Serbian"' 'sv-SE "Swedish"' 'th "Thai"' 'tr "Turkish"' 'uk "Ukrainian"' 'uz "Uzbek"' 'vi "Vietnamese"' 'zh-CN "Chinese (Simplified)"' 'zh-TW "Chinese (Traditional)"' ) _url=https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/linux-x86_64/xpi for _lang in "${_languages[@]}"; do _locale=${_lang%% *} _pkgname=thunderbird-i18n-${_locale,,} pkgname+=($_pkgname) source+=("thunderbird-i18n-$pkgver-$_locale.xpi::$_url/$_locale.xpi") eval "package_$_pkgname() { _package_i18n $_lang }" done # Don't extract languages noextract=() for _src in "${source[@]%%::*}"; do case "$_src" in *.xpi) noextract+=("$_src") ;; esac done sha512sums=('2afaee16f155edcb0bdb46ebe282a733cf041ec6f562aebd06f8b675e46917f6f500fcc532fc54d74f3f4b0b489a88934a2c6c304f849873de4bc2690b9056a0' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '1f0bdfd7b8bb0e665ef12834b3c656b4cd6140893ef75ec83e20f82a90686a46cc4f573276402fd5fc4e6ded65aebca6af29d3e9adc0d2750574fc64dc1feb30' 'a61d722e08007099b375ccd2552374ae8b3335919fc6efb7ae2a36898e824a09b00cf85510f8eb0fe43cd28847de238db849e98c240e610bd72f58d57d861094' '34065a120d6bf123dbd892d51ea336e94ffeb8a15d39f9c7d14eb57b04b434da8b488ad6c4cffbd28fc47f3f6ef544a5c4cb6eb34d012776d0991430c559e143' '609a97ef78769c3f4d551e8f3e93a285a65bc4bc32c645ec97ad3f46524f55a2c88047bc828dfdcf0b7607202ca02759258bae1962e7ac4aa2f1ee79e44d8098' 'b6173dcbc40c60da34c1c382dd8bc5214595f6990b43572645b29f5b54ec2081cf560169bddb0c9bb8173e45d9c596ab715ce3d53e6eab3380b61ed44107df70' 'b90becdfcaeefb93a0cf6d72574f9144582cc8bb39ffa46444b8e4d1cc9096d0b23d1f74408dcef91ad39baff310bce84305677b162eebdc3a5ab3a50c52d04d' '80e0c0f942dcac0f0eb7d7d175117719fc48597041feaf04d9206eb1d82dfaf79b980c8ef3516e29d43ac2c9dab95ae06119149b50235678516bae811fd08560' 'df124706819a86a37f441cf83fa422af01f7c2c37cfc332f9620fafb39e977d08acbd7650250f4b71f81b5fd1d547f3e48abab7a49630de5d77c30be11b06d33' 'fb2e5f465952ab5fc75ef912b6a76e375d5f3fb09187ffb5fabd67e19507e85092e25aaab2eab9e3bb7f113d031b47d930860a95e7ec2e4c9fd090a61b7f01ef' 'bcbaa82dd763a7992a873c78eef6d2efa56861a686dd95cd006b749b9f6ae4e09941e07438e538dc262d541578bc4bfb9cacaace89ed26b1ca0c1006c24c4dd4' 'bb37e05fdb535c7659a8124b3cbbac4369cf972f8ac7b5140a5b908415a9a87896d594fbf04c99c265ef827b732feedf11237c37af6f1adde82350b0b8df7e00' 'f785a40051c46dc5868b1eb398b278ae9bb9da264f7b9ef8ef4cfa38976fc833f93a2f17cf7753643d0ff2ee0ac7c0bd6ad9feb1e746a7db86fb9a9fdf5892f8' '9043304c11142eca7d5d7f40b5891063e31d52983de435f6ff6d86e18e5c5ec4b7e81bd9435a27e35b417bc2fa3069ab635d772ac386e2e0772c364c995e422d' '98ea53c2802331281d5c714fcde0ff0dfcc61c313e1e782efeab95de1985cdeaa08d87b3007ebda45fddda802b41ea29da063ff982ba388d07a725fc8def92ba' '0b6c6d31601ca1d7ccc4444b569e70e6f8c7be7cba8e5cefe58fdfaf2c283aa425d594164fefbb826281938f437fee8639608cc4241efd0dd48f2c918851990e' '4738d17d818a4cac063d674ac790638adcfc77f4da5699d4d1a26c6d98dd974bdc0ffc745e5f33db59450c270bd0fe07bb1f00d46f0037fa593659072c392101' '330dc0f1bae083fcd8b0731d858406fc87faf7e5304e7ec20d8455f006de6b316235e6834d1dd17c053b0705941ce628d7777da24712282966c5150d04f793f3' '9e989ff753276323d5846491be9eb987fa7c2df7ed459aa5acefd6505f4baa83f9d46238b43d8891ed8f8ff805aacaf62560ef1f5177b8a5c6819384fd3bb764' 'bc168ea644851ad96d9deda9939dee6fcbf7be941e5740ab73303d2d5213df9a883c0882cc0db636ea01e573faf6c4c6de06adc1c26e849a80ad4a73d79fc7a0' '2f746cec39056a695426031c0c66b63b13794d9f55507f0a797155b65a2e9588a3dc23fe67a5b8d2422b6fca4b5545dd7dd57fc5af5e9f7c44efdc732fe2c71c' '9c2d22728d42d048ae4c05b44073f6d4883ebfd8d1a8ef071d760aef29930140ad6a64c6b71c0a4800e1d2840d683b508280a816e05c3e0574e93fbc0249296d' '6487c694eccc34c6ed89a56c936cf1b31c7f9b1be5fb7e0e8e1a89449d5bb7188ddf81d705fe3719381123d252574e4ddc2577c330111b9a01d97ff749207afa' 'b99b6cef91a5d21e73ff169bb8649902e3e2a7f25ff06a159982e0c2194443e62438f4acc4b6f45c6caa65d896b67c61bf44041eece060cf934cf7be00a20aee' 'c1f7f79ebd86f7208af7dfb83f24b3c3d22b44af6c7df55c269ad2a7e29b08ec66e5e0b6c90323ff142494f425c011b827c0def3b2a385798275cf65b3215b64' 'af694ca10b91f614a7f15bd399d8ebfdb0282f00a50a1e69e9fea3ae5fe52a421313613af2aa917142cb228fbcc581f50992274da525780317d07550f96c9556' '54d657273a3b70573fbf30007cbadd1cb1166e2ad65506cd65126cbc9318c3b13d04166f5c599d6be50139f326b8fb3875983c5acdac85533351281977c8eaec' '5c86c8431eeaaff22edd3a2832ab0430c8314f2056523b60360eb94dd148c2d85048d7313020e6f8fccf3febdac8a1ee2dd07c913bdcbe44ec74c951bfea0f8b' '5f023a91c87ca77572ab11dce5781d99230b9310f61e3cd353b31e67f53070f7651dcbf9af8edadafeaeeb6cbdcc3156911d93530cc5e44d4e90fea1a1ec693e' '1f304f2dca8e75972c8ae164cf743e23437e37db4d3be8b463e2e0ab290f5f1ef3627a1117cf845438884d04baafa2351aa44b55129f8ea2428a88ff2321c433' 'ae17f5fe006d9f94d402f49efe86bb61e8e4e72e1d78778fd141f810ee096de429d4cc58a950423be6f9e5761c71984eb09c63dcc44eb2a187ad75ff0954ec37' '5e4523444708fa0700f4f839abf5aaad60bf78efa9207e4ea1f09435926735011f8ea67677eb41b3184b2ec1323293e139100b22e26b95d4df7384adfffb5e5f' 'd003e7a338ad824b7a45a516881a858f20069608b918466a72b699e7409ce4959463573912c165c4f9ca4828501c47c99c330cde1aa0af80a452c080d97aa3ab' '69d4175b0c64b98631a28ce4f11d88243d601d884a4d93a32333051bc70e996e3574864dfc0e7f6001467642b02a6b1e327a199cf2862f119c379ab1d954ee82' '31e7726c375a0a979d4f41a2c8169be04721b859b5644245fc965d53cf2623a2d255294de81b76162a6eb9b8f7c81ce861c0dcfef40e9b105d3073aab72aad03' 'a16b2968b609be3aa8991bf629720cda98e0bd59dcacda0e1af5f7290c88f58a02476f27ccc0b8d319024d86204c633d31662a25c32fe027c7077bb6e374eef7' '5d6ae1d713dc95a591af95b78400adedb9cde9c5555c775488b944dc5c35876529bf23a2c69bf17a72f4efe2cc95298440860a6c4ecb1b86370988c459124ea4' '23cc0278accc2acceaf22fbd01767cf4d3dc9e820f71f28f6f3097f6ca82183505ac2988eb9ad5c05ddec1731e1279a3f2552b7ca2071c55995f9d62a6e6fe3b' '447a494116d33f4804fd0273ce54278fde19eff9a059d2b29df024759a10f633abf98cf45764438b410e63fbde636543767d10de82432c6a90cd91f8389d0446' '8393c0f0964d9e86f872f7de0486dfb4af7ee34c9d023d996239ddbdc5e8368ccc2b01adfb4d83ebb79b678fc6f65a4d057ff5125483844e009abff80e63f37f' 'f88e9e9ee428efc9387066b7d37a21cbe3f6d2cb99cb93addca773ec0c2379580383a4079cbeecce37c3e3b22798ad6f6a3964f0f6a71a5a7d9abf1efc2834e1' 'd9b55e6d0db0f26f7f98c706c5add434ba5874e2abc231cc8e27863b218e771e218c006d696a4b2d44474059de92dca627d03ed1a487a9c1aee542baf407b4b0' 'c20b5205e570e89ef159235290fecb19d924c35e7f9436e8c69407b7cf648cbb8c0173f492ac446a3815f96e21471064688da1c914b4f59ddc7a27b84d57fa27' 'd302d3395bcfe16af4743c9c9068511a7a8ceca129dac45db2ffc231e872c0559f9b32493bf7f37210f97f8b40e5026c8e604884d310a6adab6e62d1d68b199b' '588be1b0d86e28b3864df899129971d94b5c2696eeb78b17f06b88821fec0530c27bc2e994faaa0d42c686939783267b7d221a80b3b317d3154530c91ead32b6' '00308bc75aaa868ce937253513e0fda8a0ffa947780b4be760ab4d65cad239adbd15dec1152d72bffd3a82449e0668bdc133e45cc6f4d38355798dba257356be' '4ba17db15c17c438354657f8f1c0490cc7949d169898f768f4aecdf069e12ad4fd38b9aba0135bfda4fafa9bbb00f4c69299d9f575f9e67066a347e47e5755a6' '52ee5e2cc2f4735f0e7bd2a11d406bb59c3672cc83adff77b28cdc4f3d63446bc2e4f36d048c320aa1b07b99a7eb1e5f17d2ad9e67dac1c6771b8e27853cd0c9' '146fffbb8eec4ff6ac36a44e19b406fc0e1916dbb96c8f6cdb929954de34640151f9afe7d793778adfc178e885b94e2c2ddfd7d2e167f63cda7cbe385609cfea' 'f5430c39f8401d7e824a6792dde84d62076b7dc309cb6da963372248d87f36dde7ca6f3b2a81a89487c80b362bea95c4b4a4aeff32563c0ce014169b99468b79' 'c16fe889211f61ce493dbd50bfb90c586cb8f7e6a965469293ae616737c031007dceefcb271112d1301ad39e39f2e3f58daddbb822c425bb8e8e1596020286bc' '6020e09a340eae3eae48e729d99bb0bedb5c44b9bf736c711de09695f2445b22dc77144de941f21120baa6c1967522e3e8115f2456119f86f04d08d6fe5e1135' '50abb344ff790ca18c5a3a283b7dd3c737b965c55976627fd0e91f11a7ac0651be51381d73029775688019e52c354b2712f49afc443570aea1ae43b09adee76a' '4c08e7ca558ee87e67ed34cd3f7fb1fce2854479ef9ab510b1c071966f80b3899f478a50d67dacd0567e645437aa5b3bf30931161342a532b9154f016fd63a0a' '3a0c11a105c6bcfb395ee01954641e1f594ca5840ab0467ee866ad58a0f6d3984bd2f619fbe25c0d85d3a6ebf80310156c03f5e9f876cf6ac6a1ed61855f8232' 'a005b30ab101b82d2666b50d0977a5676e761b5ea700bc6fabd049532ad967002d2b4ee92d6199507a49e1faef173ce4b09909d15274f759b363f95731369abd' '4de4489b621168ae04a51cee3686adb16e2def042f196c026a9ef543abaf93a01a57e683d8e6b2df153c09d01e2c8c32898271f23dffdf07b062759cf1b9e10d' 'a2d301bb33660291f3771ce47c2beb2b75331eb1a0bcfa55a26e5e3f0647ed4aa24084c40c6d1adaada8a3353d9b2231577426ae08714afa3fd52b0927662d47' '6e0f44387efb1f266847f685dcf63508056b9d69c7e05c3f7eb10bba11411213a2b63ed12f1594c4a3d3f2f8d849268094335053303d2a1d3196ac29e135bd80' 'f7770d351cb47cffa7047747f09385072de8367c900afeceea896795b69c42c403e8d30b15042e3d205e8c9640525209a6807cd806a042405ee7209b45960373' 'caf1c6bec7cbb9945efb87214d2d3e0186ee05f4069fa77d6d531823a320e9665f29493a667eab0c4a61303f0428de709f0ff447daa3da8e07daec0583ca5074' '6745dc0535f754186a28425d9c6c847c393883cf8c3cc5fcdd904a7b2426a2f92f68f0bbc3cabc162784c563f81a855b676096bcde21029262006ad247c97320' '5447b0b16597a500e3339d7282bcdd9e6927e719e8c8afa5c71cf608e7a18959be66a4cb3c49eb7400c8fac38ee0ad7d00b41ace819288eb1a9cc2456a32b7ae' '14e74a10c7f0b213c39c0cb1a13d9951a6129d4b009c94c24ea4e346b6ac20d9250fd6a0541414d87af65267e7f6455fd343a6ffa1a2f51617f52bba2eec90a6') # vim:set sw=2 et: