# 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 buildarch=12 highmem=1 pkgbase=thunderbird pkgname=(thunderbird) pkgver=91.3.2 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) 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" CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` CXXFLAGS="$CFLAGS" 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=('954be27795935e494d27d57da99b49ff61db8a2b26fa8e159a30d6c272033b015790735b40129d7de94f861af23cf748f88a7a45df3861f753d6e15d28fb366c' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'd6d08cfa221cbc4ab8ad3426eea860348e9fdc5b7545cb220484315a05fe1d475fafe60888b8ba16ca281ce08ac3d39bed85a40b8952a19923c9fc995c9602e8' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '19352b7210a0edf2770a3d174fac12be53719e82adc42911e37736bdb8f9f5d5320dad1f583c79bbf067a2aa21e2d8f8152db8aef91406e571e6f709c569a781' '61555c72082338f7b1550a76809577edf0f3df67aa3c5fc66ba8cbca95272ff9cb15e70bc7e846936038fd7939460cb7dcda63878fbdca2ce44dd9a848ef5c78' 'b05517ca2ff26b308c78e7e601533464fb8b1816b081553a99bc0daf9393af39ffe68a16bc28fc2b9ab6200ab81b889ba9005b500bd0258aa9ab7f4dcacc6f48' '1ac362e2e581c92f8ba1d68e6a1aea35c5a2450bcf46d60ed6e9a24aa602fca60f8a474ca995f0a740f0315bd5c1594006a67df9fd52f039fa7733e2d4ea06ad' '56dd370da78e783dd1cfafb5b7f3e32ac1dd23967dcea9d257aa5132334e29967e69de96a30fda4d71aa3d4abf6179824ca3a10641e284002c158001ceb2fa08' '37526df45b3db0aba6016fa681eb01b294493c2c937a4923d63fbc8f0bcf7840623e24eda5e48784e4d7b8414cd7a52b69ce4934bb9dc218187335789e681bde' '290af4ab5e14d3dff3738049af519896ce0b75a173b4d3b9558405bd5c79b0b4a6dc6af4ecffd7eaceb28882a511a1cd6a33c5a118959617289f8c2878045295' '8c9219ae0580cff202cd368fb1cc006eac1cf41ea38ab1cdeaf6db54469281051f695bfc24e466a70cb7f7d8f3ca53bf436ad9d721831aa0ab9bc7666e39a269' 'f29f45956775496a2b8c50442155ac16aa58389d558c75b38e186f7d46a9aca60c38e8626e05bda09c16fb5be40342d5479f55ff797bbe13e067f0eb6845a1c1' 'd06281cffaaa38e3c1e3192c38b26c875cb2d032821bf5f0889ffce462dc6df5ca7027b2a145a0eae3bb957451640e9f385fbba4af497fe35c55a647596bed8f' 'e5e19c0d02ae421aed818e55760883e43a30084e219df81dc68b25f2560843da1531b0c0cf011af7e4dfd35e921485c3305078545e1d96c22683dffc7cdf6e9b' '5f55286aaa5f86d010caa3cc3e66bd574b715eb63a6189ed25cb4bd6205f519ad974f0b5185a0787e000a3e7cb1afc3c4efde908cf2d8ec78c0ba74e5bd16b05' '5713163c6f9cb6eaf06e7b1ee2ecbf5dce9adfa905bf672db77d89859d9a1a9ca780d699921f64d298b8844c4c51890694460303f2dcb148fd1d2f290961b08a' '9b7fe4a982d7c659eff134f8f77a4a6c342aeeab4211ee680dd46f967e27edc2965a949d2faa5e5c56a98bc6d50ce8307a4cce0e8a41760c856557729503c756' 'ceff847838893ae23c088213a5454f70ccba8a84763be57d63de6f52e98dcb15b82f9f13b24fa09cb3341560e2a450467db13fb3f4aff6f399d8cda05c34a270' '2d3503c5c9b6cb7ad3126f7d78498b701f43dcf0bb02494ec6b4c4a922ab4992d813d6bac6385e2070ed42b776898d63479bb9471e53895890c65447a50a8765' '2a414d9365bacb223ca84c0fd83d86bcb17d39563adcd61244170919ec873b257f3e8a88d128a0d5cd54eca94c705e1b7633d538e552b7dc0638f99c0bf54339' '226d783316a15d18a1cc3a6b8666eb7a282270b54e5c8033dc02e39547220534a703a46aa60c702eceaa9c7c5318b2b69f886df4154c06825be3ebe3e9a9751e' '9ab950b3a3238435aa511953ee06a23ed2a4604f4b5d12c7a03734551c98662546dc5fddf7bc93978114a6ff09f213fb7378fc78a1a54de59a9738e50ca76286' 'e5960720304672ce9189e85117f62b796fba3d79a0198bf8352a6346a5cc3e0a1101f0921cbde1b40794a2fb81a1c7c8b1181c34026b7c427a7efa33cbfcf496' 'bd0a08c5524df3899a1ff240d993b3bc081b67afd940d4243c049c27e425f0ece7390388f23420ad01c96826803edb05e091bf0240960099df4358392ac85096' 'aed8f85c941970d0aa83e56d5d32ff9dab5b7027b885b9e388b4f20b40fe7b1ad46120ec2ed27c328d4d13166eacc00aca103a63d530ae7a1191ed97a9d47f4d' 'b314051ee38d7b7213b44394db7af9694556a4cb0e6765e9026cb36d275b4a7a0c3d788438ed5695815d5beffdd485cfe42fbc1984b590f8574b77a57cf4fc7b' 'eca8ff21ca222ae5f9a7aec49a0d1124db4cab6e9a285de35a6efb8de567eb779f03e76ac454d7dc3527f0a8695f339c2dc1626ab41fa305edd789440364bd01' '5108c9f0c3ca44632024420f23d84a645b67152a905f31428d9eb4fa61cb1a5dd51c64e52070f1103a3f0b7d6be5d62e66774e53f78a6c0f8b4a87b0b73d677c' 'd02a69e163bafbaa437b0319d12aa990328605aade936eb82ff53c4c220c7594e13efc5f91668544fdc0cb05e8b85168e25b566d60f3f8915b6aacca7610b492' 'c3e4b2df644ded90b11632bb31760a4c56b225a8872d5cc74584c1690e99c95d17d461a5a16eaf7c12124ee0b7d2af36ed1303a5d9c04666cdac8dbaa8f83537' '180007026ea04c8128abc5088b8b1ec3a2251892f069c75bf8e5188c8131853f054198786fbbab122c7a99a7eb1604c9a578482ff0c4e2360bc7e5845e1cbcf7' '29ffac8e8d4615bfa8254a9c16e6fa4d9ddbab96430417a090147fc3106fa0510395f7ce745dfd2c9c5942f3e6dde0219ac6b5be88171d8d5c7355b73083c366' '6e1f053bc22e0569faf914d450e2e29b2f4ca772ba9609806288b30ff24c1d738f3671797d564ecf777b27478ab0606d19b42f76fdd1e632b7a78b45b01791e0' '684016f618fc89599f606b393475814225cd17308da93182bf538dd9fc58ff576d03d1a7badd6fa2319bdf24299c64309e9db114e9a21657fd13408e2bc99ca6' '61754ef24f38fbce192d56a5bd6997fdd8e745e66bac367d44cfcd04dad3a905ffa78d1a67e1b6c65d2d4225ac6aba9fc55a76f53920dc3bf97a2d49156ca506' '82aa5207902de6e707b5eff7cc134c190394de1ffdc697a683b81bec775ff92aaa0bf699a49ced6fe5638097348648bf8fc50435ac2f5dae5ced37ec600b1476' '8ebf1e674e5829b2bc5e0b673ee1f8e784440634afe0c821ce7abccb60a0c702980fa8d8a641f105f087c8156a57c310ef12e8a2513c7cc3a072c46d9337c246' '25803d3a298530fec752833ad103d0751c9c5b946151a5e070c96638bdd978794bbce32fe8c0cf4aec16c12e8f9e46f4070e807b139e13a4c1cca167a1533263' '2ae723f19734fae5e2bb74893b4284658f3bbd1089919cb96470409c258c4aa95c85716412a8e2da09e44974a2cabe316c888dd926df79c0f2b6de81fc6a3cf6' 'a9b5bf910d83bb13c8d8417f5749ff0b2360e35d52d3943ad660c3de3c652869d491d1b1d81a0ac86078ccd38c13176221eb729b38adf6a32e9c1ab333b7dab8' '47c5f8eee3eaf2035677b252181cf1c7f755b3d804cdf105d09a876798cd6988ac50af21f83c01fd4bce811095e618a297c7c73a2da16fc0a441a331183ee165' 'c9b51094838ecf071fe866dbcf9b06ea8cf72fa1a5b6dfd58966a6215ad1a44d5f55ac564faaf3fd3c5cdec641eeea51ff9569a413661fcd518f187267baac4e' 'f20da26920a8e4b13cfc019e955edad6649e0cf95b81a10631c11d8c3f05e3416e5f388ee1054a0f916fba6605834b82a27b013543ec188f7be8ef92946b0837' 'e7e2b706a2f5e2c4001ffbf039fa1015b0db8eebd57a007f291cda061a4c43932a7cc9a949f6aa3afa03dfc64d3499fd5722d81c20b7ccbf192cddf0cc1bcca0' '326e7482456d708240bb5d0838778abc220afab7caa281adbaa1d83921143c6ae6b6319ce736e4df4e42d47d1620a1c47e12c89c6ad5e67b3f7c8a17df7430e0' '2b4e7ec15314932811b26cc0fc804b84ed8e3684a029c79be4be5a3af65c90d786700560c45355c45632c787cdd85accd617debd1024583fd9b3ccd5c946fe68' 'd869ff911d2ffd23eb9ee2a5e32d9742ee64217561fbbc911366964dee839a39722177a6a7a48888872b21f1eacef58142bda1e02775434d7843bc3ca70a4877' 'aecc12d0383a60e658e9ad51762b3b5f5213db1e3700268e458a4f3d91d2fb89d78c5906776334c195874ab79771fc9f0d11f51d70c5ecfe33da826bfa97bf31' 'a188e9690ba058bb1c3023ca233e16dcaa71fdd36dc4a29274a2ca39efeab14b83a535b94a64c099265378d006cbeff258a994b354506e805bcfc5fafdac72b0' '0c56fca765dc6cec7d86d1718da68c161b80e8fe1f5ef80604d5782153414f6a8ea2b9c0eb415d206444ee2f000c811dcd0c4192a8d2c5089262914ce369540a' 'bae7f82ac6572248582b87be2403d18f2b0320a0ef7e0451647ba2af3730808ab703552188b12c8d3941cbee49242e5442caef49a25371d0098474ce82e16a72' '37966ade0ddd611a4584c86e417fd92f0a0139952955df0cf3d421a6128f5914d900b45c52ed6ea2850aff910bc80b322a3acf5f960ac7656e4bb7906a3bf66d' '609b4b19425c6b58117b2dc04b88de7791a9e51e674551de1c3e70fd398ffb0160c8dc13b38a1abe590ff02676eab88c6cfe70850ef658ad427c9591b4e3bbca' 'f96df9a299afca3cf62ca476b3ef844d898dadc36c7cb02978b6004f421d107f6f3710b6b85903049d8b8399f11b215967fa6796d5df075dedd453cd9fedcea7' 'f6f217e285b1681f293034e2836830937e2136f89fee25175781e09d65d65489d68b8bf59338aa31bc4122056bc77e66ee7c387c6977d827ffc4128f2a7d6864' '08aa812923eeb087c3af51d0fcba4743f17c8aba0770d3fd75919dc1cb92fc2f496568ccd347c6bc6dffdf0ef1d4821ae91b2b0e3dc5b883213cf921900852ea' '6a5c51b8bf7986b2d0d47a245f64b05203941193844758a973829c17fa2882ced83d97b3de6b1fc876180bff2f9dd0f087ae3b11e045c47e81bc2e67b5f86dfd' '87ba1b687dea40a154aec863934258c0810c2ed8556a9539cce2341e9d17ae7fab9805d230201d62c62648e062f453ce24b3591e1106496d4a198df898f9e3c9' '696a35a6734bd3bc782d8f7eb21d0081aa11609a48a57fbd66445b617d159945e96b1de21dc7bb84294dd0464c19c8c04a401db7ae14024ccf1b9003491a18ed' 'e2e5a1d32250934db0b2ac8312f0da1830f7830f4ed60179a11cd01429f4bdd21d2ecc3ac3184a0d57e485fe6aa47a9853a215acda0335046108edce4753bf6b' '5d2121b964049d19dac24e12913d99d027733a64971a23daa7c7a397b5ea2c6e3395bca297e94438b4401000ce71a89ab56a05ff37f85dd5f3020bb8be32490c' '54834e5ca88f6e77185352c9592a37ba539788a179eaa8690b17d04f6cc2d78d685253affc3f5042952a76574bc2946155d0d964f30b46e3cffdc8e84e9c9760' 'fb94400618a9839053902c39a62924000cf228969881d7868a3b2a59613eea752af9d2c0664231e5cd7869ac159e412da5cc304da4d82ff7f5ff314af8a14cd8' 'e01b7e442ce2bdd00bc225dbe3fa1aa4b12e04b629e6996c7fbba3198dcd9460a84f869f1f4f43353ad31ad9c3b4a4435933ba1fec8db9b7d1f6364c838e62af' '9e5556afb814df13e67203742ba9faa5befe1d72d4fd4eb417d6c4f97500a258260c8e9d3e9fe11e527c572326deab643d3e94fe9a9cc09736b5496062c5b055' '66f6909b3cadd6e560b3cdec8654bcbfb65f84b81a3c96d6a13aa0e75f166c4dbb744131d525c31f3b09c10c73884e72f0d4aeb2ea574c3f41229bed16b69e77') # vim:set sw=2 et: