# 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 buildarch=12 highmem=3 pkgbase=thunderbird pkgname=(thunderbird) pkgver=91.2.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) 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" 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=('3152f20ad5f0fd3ce2c1672e91f07ab8921ffb5ecf487e6b0d7d7464445c8d8df106eea0bd8d912ffa84ab0ad403dfcfb19be97f50a015150c9091201a0dff6d' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'd6d08cfa221cbc4ab8ad3426eea860348e9fdc5b7545cb220484315a05fe1d475fafe60888b8ba16ca281ce08ac3d39bed85a40b8952a19923c9fc995c9602e8' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '8e28994b6f2cbe606b6718fd58917dc67195a87c94fd216f3c7cff78c9a79855b98e60c614d4c872ba2222b7dd39f84f8f5e56a45f9030bed25557c22fc18ff7' '5de14b419e21370b8fb4d13bc2f18e39c59b8df6c2a1e784a4f3e4279c4a270a49b11021bc79d0338747a4142c9f7b71c0de052ef41fe1a7f2c4f2923ab2b36c' 'bcf2c1bd25545ee6a00ba8932b786e2b6ddd16f0318fe6f6653c02bd28c10e5b582e7a2adecd60c8aea3af9982d0dadf0ccd08490b73c3d372d0d8cc33984543' '70215aac89375043e1ce63dfd35a9393592b486638fd90b3e4541efdef49480facf8191e5783f5e17cf683f78ab02ff99eb832ba9fe19169f237f04c6286a4c4' '06a15f2fa6c2ade1c25406e885ca54b50f9c94b5252783bbcc2ade72c8f300637e9be5fac578a1b37cecf895da09bfe55ca4b829fff33df3be63eb6d18108dfb' 'c3614c8d0fca7f4030a62804cbd60a47b8b4fc4d633585c62db160e6fc21de6eabff4b933089f77b6342e2903a4871559c3c7f7b84c88417ad83457e8efa627f' 'eeec5df50b39bb7b08235935fcd3818e44732196eef157e1d08be8b85d664727b7ec28257077d104e44dc79954ea9ffd2cc78880997b04cafb7cb68f570f236e' '0c3b7dcf3a690a88c32a87ba1a1e98baeaaabaac0eeb3b86e99b15349a63cf766e3fdc86df92fbdde739e01dff16dd1324a64c32a40426cb0839fbf723f71d21' '24e19cde54cedd1b8b6663cd0dfa08bfa79af240ba862fcf8707165cb384063883d5a79ccc1cf769a7cfdb875d7ef859e88c9abdb83aab1e8f1b16f2f0605873' '8a9269d85c8ead4c61d836d0f74a80194bce4101340d59554533d444f42b8d970e233ea0af0636bf00384a399c1e741316164bb6403d6abf6d69f59f006bc821' '2502c65c288c6bfdcb08363b6ce125cc6eb142af4ef6af44c4a3efd056b03a9e2761aedccbf460a7a9e0a7b03036299dc3d77a7e03eaa575b6a2336611f4f2b3' '3182641c38c5b476840331d35041ad1980226ca696b13b457366c60dab53b9150ed111459a654b168261933a1dffd93754fa1cb0f793ea48e79df3d963b81100' '6827a2fb9e4ba9df39c12afa9674857841e25140764c5fcede90145355cd4f03569f90e252fb4f7ffe859b4c9bdcf31a3978a54f0aeb5e69bbb6bc15d156cc9f' 'c6e3f2a86bd9c46b6cc7467484fb0f9ed4487c0cbfaad30b12d656b1d3b5bd947635e06221b8844b97e8801b55fb927f30fa131b616a31249cd5779dc2782f5b' '34baf36f8136ac207b75dcdd28b0a5e90f706a44197c6d52c6d90177dc7c6aaa1d782ffdf2f7518f757328ba6d9cd547826645ff85350f5e117f10f91ec1c6e6' '6a52514a049e11b2bc6c87410878d32f5ae616f5a065c6e504788f16bbf59c499060de6ccb7a9bee509f76d591caeeaa8327da0147e6b20cd7b05d7f40252949' '754ff16b17e5e49a9ecaa287e4051f83d357e17adc473888b7a99202685cc3ec042893b234b2991e4ec2b63ff412bb3d24e0e4d34803cd88af8420cbb08c46ca' '79c3a0a8bac019596beb1a797b9101395a07ce99427ec9d6d51d449084bb85880990bb260fdfc86821411790ba1e5cb3282007c2cf86ff79b2a1b9cf0047f5ef' '9d84a4cbcd1afef7767a0fb0343cc04b8977a46d0f9aa00cad69d8cb566872ff28b205cf561c2c1980aa3a80ef9f9c6fa769997ad5735303902933d5dee9bd28' '757aa9386375a0497ed07cabb89832aa86501a04eaddcff89f8754eb34a207e95e3e95aefa387493c62ad24a11482a3ca0e4d541d5dcef63748c482b084a8c99' '15d66c10d3143224ff81310fc3d6b0bcfa56eba1a7b1c39fa599ef365421c5b02eb796a9e3c7ba7e086deae4a2a6f82e0f43bfb47398555ccfe1db5a25b88217' '9a9307b0e9602d56db5f4a804189d4a9e10b30408fe7f3be34621cee91f9ff6e775bc6683ddbba26d28f4f1b173389f47a18fc4fc4df8cb8e96e3da684e5c903' '292b6a319cd09c3120aed1e0f3ee512051a5095d27717db734a26d6ab4aeb0e03c16b0f229d869f902962349c8d370e188e607861b8484185110ec674dfdcbe3' '4dddb047e76a58b9b517ed7b95769dc43506a00a353b0ca35a8bcb3dbf1414ec489a09eea7f0486dba4c5bb5929c6fdf5440ee546937e367370c010562064f9d' '5b8ea778bd49b1bca8b82712f7332f1fe97045335510367e88c04809dfa9abf3c176975f24192db9c1540cb529bca2758363357ecdc71a7d7e833dae796b396b' '2b25f5a6f8e8fbabc44aac86e2472666d0bf39170ff66e23206c939f46b0247b555e4ea0797c1c46675c84614e7b33fbcccf940a8956490b28d01eeb9d06fdf4' '2fc9c745e108df37e1fcf1639b1630a28389b1696fcf250bafbfe0de7ea95e81d3d683534dbb6b7557076dddc4beb87b51dc7e613f477c94d9adebc8bfaac5fa' 'ee69f88af8860824259bf96585e19b28f33f674c4cd67d22ee20502d87c69462c72b0df80148c964d3c4664acca92ba8c0d86ba39924d9ad84c2e2d67ccfa7ee' 'fae6c5066b4a975720334335d2c0d9f0bbbd89252c60a75a83caa7807d9cf4ef92e87caebc5c5d70bc5d0792b9d640863bf990a9651ee5094768f47d486c2602' 'd95b9d7929bef8cf1df6ba85ab623d66e71115897339476d491121f9a2ec88b28d73be5a30151cf9736a3eb183eac1bcb08b83629693fc767afce126d0284560' '1d5e6f48e4c4e75df493b9d5349c1de65506fc728e5201ad1f32147325d4d2970e4abf1e064fdd477373765ab42929f37b8c2e4bc888bece4e165626d6126e51' '5e4186be2b58f472a44524a7fa36f120e0bf872365d2770d305cf3406cebc01177614a0e8ec9525c66301cc2b65f65429dea6276470aea7afd22cdfe2f8d1987' '4e9418608ef30035a15f2dfcf8b85fab08c6aa0a8103e33710d965c7951c4020f54cb55b7566c13b30be64563e2872447a3b04c211661fe56ec756876fe452a9' 'b87c78f9990ba0c7f14d10601257d971a3b054ff7a4ecdd087f62214b98dc782a23fbbbf863098c8e83ca36320feac15aa80ddda429aaef192c701011af3900f' '2bd29b6bb783439d58e89a120196bac9393f8c22cedb3cb0d4cc3fba599d44d3711d77333a27ada534f3e808f9768ce2fb0b3c60f39ee45d4a6ccd60f20a6e65' '127787a39b66bb492d27b077bc28bd4d55429fc26f19d3b733bc2c10a1bcc88faec2950585a390440865f4671de56c3b683888396e40e92b7176d5402dca6211' '429f87b057ce07bb65ff8cc77a47938a0a6e0dbb6f3a8214b961a420e992ddb5c4a6bcfafb5e5ed1984f446c328d869a99c848f525ad0700a97d7f56792e0cb6' '6bac9a7b9824a9ec818b7e37c0b40d16eb635dcaf3b5afb587815d84b5ff3d28be235e22187a68a4afb730598f960849f42ac5f2c00eb2d7edc2aeb61c901e1f' 'e5f6183678893db604992235d05785de8e1149760bd4ff9c3bda91f60a47f9503c7813de9e34f9c5a2293128526c83faa04ad10b98a663f0089011f714b3d8b3' '66c301302bcc1003e3c54e9ae7fcae3f2b2ced7b423d48775e47cb2a287d280e34cb37fe06450b3f53a987a2a30a2d803496bd6296280bb7fffbcb40dbcc1214' 'd0ffca2033537aad1e5c2401ace45816075c5b851332d491641f73b4e0083ba7e50427262278ca8c9617086eaf4060b7c49cfe6363c4157b435666ec9f3ad829' 'c22086c0a404eb1bcc6684a60c78826a6e8a6abcf46115bb35ad6166773b1fbaea7df065f58904ec192fd832ba8ae85aec80dad9d1a80d682e8b454eb58d4ba5' '810710e121ac505e7e8a9d55a83aa60410528ce6fcc76fd9e20fc274100f234b6531ed499fb48e10eba9703e6c3b65e8a6cf409de121ae08a475febb838354d6' '4d25868016e9af120d1bf4b5ba185ebf7d16a30ef97b9f5dea3b1e0b9cdbc4795b346f777929dc80dc3ed506aaae659d8fa73370915bbe4042e4e70035db95af' '25bff215fae061889743f4068ed2097e86d7b154e2cd76a0aa94d626cc096c0c9860333b40a34beee034eba07966823fc191dec16c936cf751b5875ab0788c31' '8dc42f6839499d4763703076f4ce86f442d6608f86fdf8ff26693f1b498fb7612783e4c1fb86d203106db2ef2574f213c1cdbcef0ff8cbf24c2b831da3b626c5' 'b07bc95995bb8c8539f10d19b15f37e3339b49075abf5dc2642181e2fe00de1e8ce344377a4e4e3fd02d5722931c818891f11e671dd1b5706155077553a296ca' 'af21d7c42601569fe37bb44221b2f97b4e9208ee3693f029caea5f94d26968a1ed03b0616a87033c3fe522e1c6ad65aad60faa8601b92806e00a94e769b05576' '8956d8de5d6f1c5c8ba0a6738c7298f5f2df2188994d4530dfd2be7a763bda13c86d5795d2b6e4b29f905ba1891e8440a037ad805192849b5652dd5376950df2' 'a6d32053bb28b6cb5cc374894836e7f2d77cd573e6e6d21bc46a0645cedb9b740fd986ddee20a69d41c296012c06993713a4f3a54e5228416697626191232554' '59c8da650810453aa2db26c2af02e95d29c275ab57b629028f017cd4c871fa954c5e4e487be4c8d2f004658b20a316d40b7a1f9607f0d4257e9fc15fa4b4c869' '0d38483af1ecd62304862f6127f8096f864caf425b7e5b81cfc74e6015d6d32fae1c011ad854500943b84888bf480d6de89a716389525a0ff11420d6b40ec7ca' 'f3044ac5aa819ee0ce01807a82518b23ff2bbbb4f894a638a9a31e9ef29023c18dfdb2574fd6b26c5a32ee2587bd0746bb08b390d9abbeafddd78eee0512540d' '5c96d3a299262876127d58faf5568bed31117d44fe8231d4f7288bc259a24cfbd78d6db4d700ed2065e06411ff8ba4dd0cfa1886843a545678e348a57a1fbf95' 'a2cbc8edd85538180cee4f6ba7ebd6124da8de2ed3f37346349ba89db71f7ef8b53da798b0e26cea3ea78e385a9d7450810fd416757aac1c86e91ff85d793321' '823ca52407a7dc429fe0a034523881fdcaf8131db60d8675c93a9ddd05700569fe05baa1bd40bb829b3c241caa49f6e7cb3967cefa60b1c88af623f8d6ebed14' 'f754955de95e9eaa9f452f660154bee126fe474ddde1149605eb2d0570491ca3ca9ecc253b37f42e5dcdafbb7847c14b202e85f418b09bb0ff444f69cb60a796' '201cf5e76139b4fe19d07274ae4364983e10e1d65a253fb8e51213fdd9d37f3214b9a4aec0ed7109aaf3f7a482818c2df0708d5f18e10525d803029195345fe0' '68beae2fc28c17fd63cab00b99afecc24b52bb3c034eaa9d0dcd2a18b859400e63c7bab0aa10898d0783c0faa03605bc481bf33f75e6349aa1dfa3145ea4c607' '3c108c45eab8ed5e354f06a8389f0f92ecd3ab20bfce558612db656d472f2066558b295d7051cd25f97c16ce2edf66b8afc6c0178ca450e73771edb99705ddf7' 'f4fedbd7ed875c5e1fb8bbcd9d40793b1efb0092f9b38a69620549cd3fd7c1966d544a49b2cc1a75619a80947d4d3a833b24f2b4e496e72202303bfc64150ce5' '59045029ad04524bd6b81884ba78ace2a417cefd2c174bc07cf1a5107b912ed683fde07b54bbe9968eddef71db47373a1ecec8e6b12d929db35e14daa30fdb77' '8c279ae1ab2918391950058cb10c205bb23b711a41176a8849b9fce885ddb0d48eb4e0f3110fee6bf143fb4de6ce44dc45a0549bb07e00aed23f4bcd666e68aa') # vim:set sw=2 et: