# 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.6.1 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=('a74d9489bbd2d62916eac8214c6c3a54dfa0c03b56ad471750724315f8bdd96b6ee1079687ac973264ba0f70bdfbf2f183f359c33f7fcda9a9e48914636b1ab2' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '23c1e37b57207ff25207a3655bf3c72b0d179f62698b514c5feee706f6ff050b10b1de68574e59da5978cea9a367e7eb1e1d9591a061cffb2e6ecfd4ab110e0a' '50400b6e078551beea30e605e6f190837883bb7b80509fe2ba5072076452d3eb5f86c57612fea8e5adec046762d0b5a59ed6b2ea64a9f4ff54234d8f3fb44930' '5579e1da9fdb22337b7e876a72d8c8d773416b135635e6ea7e455eb4f7ba123b47f46509a3743fa787e8985b4fbea13b70e8d423901575a96eefeafe08b5c7d8' 'c56f0ccabfe9d4bbf5f3118ab3fb57165eb20e322a022387e30cbbca9265169b612ac5ea0a31218aae0da891a8db4fab363d4dbbfcd7d605a75a2e75f3bf9930' '9c1703d8d35c69481fab183d968643292c6159c13e54273c7f1e61c27363ceb52935ff1c2749821df5d46497af3353d2de318c3117afde9bd7af4dd3c2b83b3f' 'c24f3e6f508a82a3e57645d3a0fea6e4da6427f3ae919398e4f2787136fd540a2531f7cd9ffc7a5cb2101f6ad0ed6ef2ea82a8d85962b36a7dc88b3f2981912b' '68aad2b93a37dc5346b52b9cf0a977b179015722bc3195de2b3a5e22ecb6bc920878c2b13ff25f89c9bdc026fbd646cdd6167d523f79457668a1e34da3cb3e69' 'c3871fa73b1d16faa046a17028e3234e63fd523bc9fc53be876364d78a95b7ba6ba6b36d3b8fb909f74f7529fd27be62cdeb32a843c2c5128aefb78c835b6d32' '7d9648afaeed577c9994d7f89a2b2ddf8dd25b85abfcbcfa762c780d88a2381d32e543a4da40d9b9d2b87c658e02540cfdda27ee8dd2beaf4038c79114e676a9' 'c19ca4f792ee045440613d88af313e3176fe151209d810fc81003df30d747ac50254c209c0e1b523691f6706c13fafc33962fa32ebf0892708ffa9ff22430831' '0611d41955c0ceb8c9009c19cb54faa4ea106722b5c770473db705308472d4af50b6cf73f8e4e7c5b46172ea9e742e909273fde9dc02525edb13927a7a8be475' '9569985cd0067c2cbf638eded1b92f3796b210828fde3b3ff2f097284ae5126cb02ae2b394b2f5817fe595a458b8359995174807597bdd3308b75116e9d640ff' '8dde2e96de9fa2903010e9acbbcb13edef5792cbb7f3a2eadac75c603448cdae490cba383be0edc380a8cae2c3008ff02689fc33c1e605cfec716ef3ef35eadb' 'cf99fb58a72c2e51aef3c3eb2f21fcd3a36545e0bdd9973595f6974c44607c17c710c1cdd6bdff53f75538ce440ca6a28a2b92ed6e1ce5c7194e4a18008ac736' '58581a6ddc3842dfd04accbf9d246ba175b180135038746ca91ddc6eb08f675fa9162e5989582bf021788e133f6a3deeff5d202d05b414004e6a6eefb3d5616b' '8d247b46939a5c75dfb207c48cca98101aa4f0139faf89da5c09cd20b9578565e0f0e29dafb04bdd75751b3a544359caa0d668092c9b49d2d949c16be590634e' '48b700c6af8ac1a42c45223f3275dbab3ce6aa4e1e465a4e05da326c2cac2ce1e432e3a16cac70e2655daddeff7e516a6eea47f7a7f23117f01a089b26a4ef64' '49a64c8ff495238243719fe1064e47a31a6b31396128469c44ea13b6c1850a7f466cda3979056a1d984baa7bd3f536845b94fb4e3ea42ba7aebf08d61f5b851e' '794d1deda2a83290cd5839409661f02f77c9fc9d9942b686d539e7fd57ee67b3ae42f12be51359f2f9f1ec948561d314411d2b9e396f798ce59d7ca41e368c5d' '514ae8af7d6c6c337341a995c7f6e0cb46a4895debc6915888e4292a74b6cce409d07729c0e81bb8c15be0c4d212483d428c3b331c76c7c80aa11e00ed9532e5' '994f6871d91a7b3f8de52a7773ea9e51dfbb3359f608f8c243f492983d09603feb44fcaa0c0d2342d1eecf4fd8cb39c20577bf02103ddaa3d7f3b31df1eef74b' '75870414b8c3affba18d7a210ff7e8c14357da9eb8316734e84bbb7da3e9e2158eb97c2042a597a70b043d21acf8834582f9f3299f683579cf425b308c45ecbe' '4180f39ecc812a7f5fd421302d906499fecfc5a09ab697d002b026992fc5d818d6fba360e3ba33de24c1d8366f9f794c2fa375601468c89736b192d50275f8dd' 'adc1d2587b3d7b73c6eeaaad735c11b1a14d3f9c04e813fa4baecadf475bb5e8bf26d2cd3bab0ed7c13376c7f575e4b63fe5a5ecdd84e8598199aed641a4f741' '3351867f874763d791a0d8e590abb0c43592746f474793f2e978060517a6089e8ac66a403edfbe4cf2c6c66a822ad258d1fff16c0435f592056ee27e610fe7a4' '06d95de59a37fb6230c54945467c5cc3aeedbd4514d7b391c7360cfc6e32ae11d73ed4ca3cf2ad67e5a33358f3e5336fa39018ae98de94628b2d7860e646d42e' '9d2dc538c4e1ee4c94ca4d85a0b6b76551f70fb361baada2ae5a898a5451f87303b453c463e8c75dae81e58c948fb04b39fa097e32151f4625b6466abc8c3826' 'd41b186dc1ebf7c4d1ba1aa62ca7f3f8fcfaf1c6a7e7c83cd438edb2cc6fbb457ea5874acb5f73fb6bae46bc763a0880240fe28310ee88aeb48d6880dff3c129' '1295d40aad073cb54323a7a9baaa9ac5507014c488fa48fda46beef7ddb845955e53d2df4b55fedef71fe1e7a7b8f0a058a34b057d56bcea4ed7dc13fd527574' 'b08788ca593d78ff6395d643d5496f272898394cdb03e1c3e66c0e3321b99c70b8d0ba3278996b6f30ecb4a3bc2efec08525c04c87c76951e0c475d991747232' 'bf0ba766fefbaeb2618353930a69c244d03d29b19e0528b8194a6192f3f61fd149479115a6b6791f0e41777fe4a6916e26fbda46c689ef671cf282eaacfb485b' '23cbec15d6772a07bbd30e5cbabc2e3ba9df58998edc8d1c7685b601f12d48d55e246f808cf1a51303a440705b16411e64c4bffcbbfe8076955d0497dbed397e' '6d4645c9c46bdb9e5428c7d61069f7557e8311f4ef3b9c3d79e2957a5354e4d39fa21f4a5fdacc5dc78ee2bb48021c9c20efd1ee6f919b30f84ad1c413c10995' '6de68a7a0f799a5cc94efd150677efb4cb38ed1fc91dff6493891d8841aff5479503f81da7c770f9b89ef0c8c354cc7477065799e700be45ec3b69cd781f52fe' '0009c7e436ed26db2859463f245cc5ec1ff1e327aecbeb50961896f9f284bbc79ea93f08d26357a41c5a1ecf1c15c27db00a9dd0813a3bbea8930f046e535eb7' 'e6f02769e36d1ce65227ba9e87e2b536247d5cc752a3c35d76797f56e8c4b8a24e3e0a1a9cab3a447f678fd843a7c97397f383bb5c3640b5efd92da69aebb1a1' '9c538a370566c3df371d50b3cb90c99cbcaba7094c8e71f74a71818ef55530e29904e84aad2e32c90acb594efe94c78bcc5e691e07d12f0532b6499010445704' '21403bdd401421c1a22bbcfd6c79215899987dfe587a262753b0e2f3aa64509ac0fa265f7935a71663d6f58f0934394e3b7d23238d5aebb6f2a85cda4ddfd926' 'ed27508649f944634d41fa59a4e69c821796e450d0c528255ea7d2ff6ff46b160fe9b9976b130af9a64f2a3ee8500a6c6721b9258640d095358ae49da87ba6f5' '75fdad8f9dae9161bee35220a3edc2dee3ba8057e27d01ab9d4d126a78b39706ce5538e69b681c48c224adc99b9d373be555c79c592fa3af02c81a419e508708' 'f484ba6d6e616468734174c131b68baa0f9da0b943c134c22ac50c607e2820551ba8c5131c1da0b9e6fb353b52288c0eef7c37a9c1ef67ca96e4763c75733d8a' 'cd0f475ab2e2d6d1bcdb1b13a6007cf3a5cc527f44a9f8944dc624833ed6a2d9299680d378fac902b95e4d793595be375d3d354b3f65737f8c24035820d3f956' '8a46bb6546209cb9460cca721d7073e12c62f84db7a750b1b6bbe952dd36c450e582c393d0690e0cbc469d3477cc8250b5248dc28c8b08831c62d83bc532920f' '30f0b58e61a0e079293f96bb37316b1fa33ef01e417511884b9144237c8b46e850f9e9832656c538e392e38b5d4459c4b1b05f71d712affa2c4dbded31f40594' '5de39eb441f18bbf942de862946bb25ca5a09d437efb525dc249588d70ca64984fe9bc8eed7612fd1b0bd2b7e67e347a450914aa5a5a0696e12ae27f2ebee291' 'd02ec35b7b5dbca10acec8558144a050f892d1db20595b8c036e53256887f6a2bccaf663083e5050cd59a48ca579fdd7ee601b76c2b7abe97ddce0577873cd57' 'f489065f7079c4cde89230d8e260d166c1b244c26f44f1fe4742206fa80f687584b865a98c3b724de5c4fa8079c588f32d8de47b4e35a8afda8baaeb9b406013' 'e018d0830610b04eb981fc1aa01832a17ab506b7e7c946c038e628934edf177326249aa7a6691d1e5c7087d56acb7827d64e4222f60e2d069792c4822b219708' 'f8fe6c5f957d6b999b6e358fd9e978a31f0b9afe9858125473f43685e9dc159823645a403101f7ed3badc2b3b4e0d51d75211f74bd71c6aad30f4ece1a88b3a0' '377d8ef76e8da40ccac111c0b6948968d2970d0b2ed20e07f5be21061f8ca9a764e6c32a0451bf327cf22d2edcaebc95f82e164d52ac22f9a9cedea95dc11285' '780c04f9f47988f922a84c0860486c8484ced79420947e4b2faf72077368613d4f1b57686c9fdb3752f56625477cd275d093d59f470e85cb332f1279ea44615c' '2f0d4611824272ef4d1bb37619493307ad53dab4a57426c8456bca2c4d6403a7502dc7a85de23091ab35f65b5e54636bdd7a46a998ad5e2b56fb81557b26f708' '44ec2b47f7baa6d4af284f0275ab7b9e16982d1a2dcdd1b2ae08c0da9a56a23948508df7a9738e28c9c48a6af9d3f163285a1d05d9f525b2738756596738dc98' '699e6792f5175c9dafd8e858800131dba4c9f71719dc34c0f58bc84bc25978130a3cab7d2c5caaec0186765f46348f36de7c2b570862429ef1c9b510fd496d05' 'd076159eceadc8c5cad9527d2914dbcd60b12f0d1e2178e4ba1b59827280ed47b93cd2fb0dd903afba9ee0fb4a4cfd1e6175670aa292550145215106d4d1e0e5' '4da1163d9cb1653d01366761e5b3671fec4cde38a125ccd409c63b4e4b89382745a3e74a9ef8196edee934dbf72f7c65014a6e131c6ccc4ad1a5df4f10b2bc21' '5cc78867e17534a4d6cd7d6290665b2ca90fefc3e405f4757b5cbaeb8bcae129e0236d471a000dee3773aabc55b1ac64235b4f1e2d7e31c61b2f3f4f040ecf9d' 'f919faa5716d2d306f118605b80110fcd4a1698d68fc357e8eafc74ec688dd867c110b828ee8514f7e85451d0d56febe1f2e3c68b5cf678543e524d61c26662e' '30cfc17a871ebeb62d6674b00fbb836c80688e224d64404603edb653fe9106e9a2ef90be4f010cfb81e4dff3784fb8404d81140de6d63b74eb62702b6cf4660d' '4712d2ce08e1326bfc1feb4b1da8afd58e950065e1a94941d3b2c6c9b45cd152b58fc42f799dc20c1a650159ce8968ecfa858fc41bd60ddf9607fd6d8d26568d' '3aca00d1cea6c528998070c77288c28230b78ac4a95f82a3841e5a3b30605dc4cd27dbc90efd3bcfc696f188c5d33f5cedb6586adc45dbb3162ca675414e7b09' '67898115b1893667eca0a0cbb1d34f031c0112581848151168394aab3cf6adb6b3ab78324955c65c56a90d1ae545a9e1f074201999baf579dba28cdc30691dbc' 'd2ef4ea6ce7f45b0e5da11d6dafcaf74d8b374c8261fdb7f1aff6b88f68ed1f35c245dabc3ae6fd792304a211b72cf189849ea85c40888fb53f3c577e8071346') # vim:set sw=2 et: