PKGBUILDs/extra/thunderbird/PKGBUILD
2022-01-25 21:41:49 +00:00

313 lines
17 KiB
Bash

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Anders Bostrom <anders.bostrom@home.se>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - mozconfig changes for ARM
# - disable rust lto for v7
buildarch=12
highmem=1
pkgbase=thunderbird
pkgname=(thunderbird)
pkgver=91.5.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
Add-missing-stub-for-wl_proxy_marshal_fl.patch)
validpgpkeys=(
14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases <release@mozilla.com>
4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases <release@mozilla.com>
)
# 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" <<END
#!/bin/sh
exec /usr/lib/$pkgname/thunderbird "\$@"
END
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -srf "$pkgdir/usr/bin/$pkgname" \
"$pkgdir/usr/lib/$pkgname/thunderbird-bin"
}
_package_i18n() {
pkgdesc="$2 language pack for Thunderbird"
depends=("thunderbird>=$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=('5939e09b143e440efa906d95cda06826bd3a73b2edde5eed86229b8a0e4d1434519059f37d319d26978d7eea9b3906c5e1c1543a2bc2465625d5ab5438855717'
'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85'
'7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290'
'd2a6a14871eb227d7d2941936949ed5d0517f63fcdd135ff3fe9557b6cddd815c99babd326fcfd504fa9c10134e0db57b12984a8abe13c378f2823041b134e23'
'9982c851d4cb0e9ca391649f09d8521aba716e8e75b600b81e0810111ff0e0cfac08cf27e96c1f3a3cc096a8baf21c08bd63e4ff2f3a53338168ac35ad534c1d'
'8b5595201dd5ab76de158d7b7c2685f2e50a6398a6fae41125ce572ed71e4ce83c00d595c18288cafc883d188373f3bfeb66ba970a60da7d4f82beabf5e8bcc8'
'0b3e588e03fce7d7dcdd0d83bb647d95216e7fbbbcffce2e1d94be5a4ac1c139bfc970a4140e020700b1827152ca4d7f46542c61295f362dfcaf90f3049e4ada'
'98bfe7a71fdb175cd0679aba829dec1f216ae3427a1097ad97f1a806866930c84c7c0fb63958d4d07f4edd0409536090b7ec0b8bc8590c5ad31361fa36136525'
'56d2467f23173b5bf39ed97e0ce1cc994c6bd387c0ea60d6554e20fd23448c33787a213aef07c1595f852d15f6127525f2a992dce9fc130643c15e7a04f81b1d'
'9259b5fdfa22f2e0761e11335443274df23367dc6b7cc49c2122a50e09182781e171581688d03abdcd2799629d778c94bcdda1ca513aa8fd710a6f412fa6a4eb'
'81802a5bf93e7e6ec32d4e5ef1fc6365c9e47136292a068d69527c0010c338d1e27905317e4d3884384f39cf40c51fefd49d5d23247346f543262376be7bfd96'
'93a29d8bb16100ac80a974da0e4b4a9d078e1d0ee69029b2e9c125ce2e86d7857f30ef5c2c5d7c1acbc8ad8974f69535cd265752efe68faa64d21232a503b80f'
'96effaf4ef9f3e5119522387854fe73123e3308a0ff6d26fb189593576b77b64e41ad6c8579c7f1da1cf553db9e46ef172e1b11a3cfb981ea5977d91d06589f4'
'e0af2c2944c7f5069705655f673126b5d1ccca1572d8f3bf19116a5cd44acc54e0904c7e7d60511bd8fd9d42b522770d079b49bcdbeb26e0d9d400ec429251a2'
'3941045f01dfb32409f487b2785ff09dbbcb40b1e80eacbc797292e03d7525a9be0004b0a9226c477eb1e8c7961d73d6d4fc2ee01b81463dfd50a5d77bbcd52c'
'763043396c905daec9bfff9c50189ab9dfff421c546f78f1e1854ab5ab06643a35183ee4976d024ad313dff5b843457c5160cb3b67a616c26a2121fcb8e1bce0'
'd2caafd395d3774d414a61b10e7f7eb31917c1d71fee6a08163aaf77a3f99270bba6667126d413c160f01104b11683a22f9fde424c1dfd1e697fb5a2bc863c22'
'4246f1d714fa73729f592b83943449229536b8d3551624dd59b2d96b9a24c54cf8ccb5a847a5dea3a9d7bf86f02b43b70d4211f3ab91c9592be1b45311501708'
'90e436ac5f44cb5ae853b96667e084db4f832fe29692d9e19156e9fb8713a9d23b0a91170a73f02c2834629672f4a4894805c8750c129f679a7bd19b9d79fe1d'
'0f24134e0569b377fe02ba557080c4334a0ab12a0c13ba15550df353fdbe276326319b53f63192e68861399cdea7af6e49ec0abeedcecd1412e24fc4e79f5e67'
'd12effa8ed8fefcc5dea13e060c86141c7adecd0b4b4aa0fd70cba993506c2869e9ec231bd2ca414d5109be18b8772b37d344b4d8027208ed95ae8035f58c73d'
'30c1f7822dd2465dadc209a1e6a9e125d0b7056506cf66f1a59f0314a0c4efe6db3dda0359521804c8b390e0f17a3215b7d383d2a9d22cd15270ec0ca43ff30a'
'debbff1190502371de6cce3a23960c9da75727a62996530037db863c1c670c7e04c20aff59d6c60c8354ef33b24b2c48bf7c1152674ff3bd22d7e7fffdc5bfce'
'039a8adbcfbdc7ae9642669ed35d6245f82d3566e0ad4cb724e1b7f901226013c296cbac8c2ec62b4130ba8b6978487ede5101ce7b62c9d4316a4d0999a4fb6e'
'fb51ed496fd37a94fcd38c22278820102f52e85780df2019640ef6d63fd755e56fcaeecc04e5404089faf820cb4468e7262ca065e89b84c0ecb4ba0c2f74352a'
'8737828e5988aa138ea70463621a0205d24a9e73e2b3695897989ce9e0a52735cceecc8ecfbf7bf8557f065d980dddf39e296cfe90cdbb54ce3815a0dea8d19a'
'f2056431954641e9fa155446022f5e69f8934bd56b635fbf1bd122831d71d805cd9526ee3b329ebb5f0d84acad34945538aa762965d2462ab0656112935185aa'
'a464f16de4e1e94ca67efbd3f92529a3cb27e61770a5d07996d3caf346b4f8dae13437621db4e72bce3cf393275b880ed4348f6685fcd65ca99b0959a6e75aff'
'6b64e2012bb683763ab674b4213661d1aa92a5e8aa438b3a843e1cb43a54eb1e1b473928c337685d63700f2f9c90d9a49f1545c7c05f860c9fae694475929bb8'
'7f27c28207d7c6309082ace513cb0b71599913ae9c6423f47cf90d0dcdcd91deff1abfde5ce25460e47e2ac9996b7d498a7ae7da5193a21448a2fd122bd94844'
'3f80eda941fd21a3909939fa26f2d1dfa941b2349ccf9ec1c0de2c1dca8ad9f3a4d98086b0806051edf76a007f93e37408276af72c608e8ade520dc9fd266317'
'6405f99a2b23bd91d664a345a036dd1ea1db63c923058264b46dc0bd6f5dd98f3f26eaa82bcc89cb329aa61b7c7e4e2e82d219197992be1a50abbd5b2fe6d36c'
'6d8eaaec0c2fb92f5623050ef085afc0028a5c7b13ddea9261a252399f20fd9a77cd42a09d8506e5137602cfbcefa4efda540eb02aa9fa1b0148791a1fca4241'
'65cd87ae3a9cf61aad5da4a75417d7030ad9d2a369470744af56c45665353df4c8a106d045e7e0e0dbbd4d456e194dfdcfbe1fa085ac2b1cc3fd43fd33eb90b8'
'a92859c74c5a19122b81f1137ac5c32a6939bc3eb7aa6842dd11435f5817588e543bdedd9f2a4262062c5c366d330166b96b9c9b4b88652c8f0566e81b26dc87'
'ff3b5e02356e42278e8c7a34a1de7e6fffde471aa33c002155720d2a7cd9d2cb8986444f63b4c0892f6ab27ab1aa284d7278257cab66a0eb973e7cccd2c102aa'
'be6da88faafd4ec0740927aab09c49dcd791cf9371790d0d1e456253460e0c615dd53d629c6f32a3e0b504bf2f1de0743a87abdc1282937786138b74472d9a99'
'f7fafd14f2d8521eb3b9becfd2f17f8fd3327da385f9b1d064b4ffeb88b2d2242bfebfe49d0335e1b6fb0aa343eb45b36a4b20f3acc5abd1caf56a1779587f6d'
'd1ed2c3d336a15fa54dc7f6bc94604ee7034b12a2481928d1e4a3367a8c1fc16ed4255a72a6244c782da87a5f38c423bdba9c135779607efc3b8e67597d2e980'
'240ddd17b39dca80c4a60080f7983a24cd71b483bc2daf1cd0d9cf0334bf19914cd64d0143c9d6a1045236ac70441346582759918ea5cb993b55fbbd3a17e9e8'
'afce67edd7cd1fce53ec2c00268484686737f21ae676ce47f831f0839471be7365531086df99fd57b391751cdd8e70cf15abd020d13ae5111acfcca1e99c2d33'
'971e57cded5b4e2a8146d0df91fded8c5e843ed589523a94f7e878e6e7916b2986ec22d3e4cc3756f0cbb7a25e30985720059bc089d392242e6ab7f93f0e0063'
'1eeea2986a72863e140635f1ed5a3862f3a241f7c05ff981986f9300aa39b79a85b08e77196ce4565650c0907504d7301bd0dad49bb7e8f3bbb9c8388167058a'
'd94b906cb1e2608c33b8f1b7035e467ff847a2b078417c3e4fe3ecd26bbc05b2ae982471662a6500590b7f7f05dcf8bad4de037f64d871a23663c8e81bee6249'
'52dac0d033207430037f256a0cbab36078303605d99301dcfbf036fa2550ab3bdd6c400cab694a73f8295708d5f492f64a7ac8f5ef32bbd5072bbf4e4152aced'
'4d87d342a03534df9baaa0100b6c5d45e4df54003f1f6465278fdae168f04295ec0c2011e8cb7c7c195958e0de707cbd88d5caf2eaf756345b9f28d024f7675c'
'b7a5c6e1b76664075e321f00dd050d5988543804acfc537812e889e778a22429b00b8fa5d7a54336fff4a1af1a3af8e26a3e897ac31d3a23493eeea0118bbd0e'
'c7eb3da6a58875d59f832ec6eb782020b217a821b1ae8a62fc5629f2a8ba7f717fb152d7ade3b41554ea463f684260bebd1b7c7885881a7053b05b00a11e0be9'
'4bd798464966401b1385f77d0181f4bf9f510629d2633c2d25b8861b13526b876b826858dd03fe21795672e33748d2f9d9273caf5412e16d709de1b97c97324a'
'b4f33e07b448f07790f1d577e4f18f06626aa5fe614043df5ef082110caf9648f80e349d2b18f6d774a8311cd4a79c9cbf56da7d0089074e2daee90ab7493286'
'8c671f8815994044e68b61f6f4a3509ac84a1d37e2b1027ebf4ff64350cf2e611345cc01397a751916b168e1b900f40512a5ee7dddac2ca9da9d98e69342d619'
'd49b9b90cf2573b75f3d6547a4f42b87c8f636abc6cd7a961c3a89606ddcbd3c48fc6529f872575cc7b0f21f8a67da5ddef0c0c043e4638567e789ac7908ce30'
'30055cfdb7aee40ce58d2e01160973702c76149622eeebf2bacad650883dfbac3a11110554d93e352c372009d8bd575f86e9da217a1b2710276ba41c74aa93f4'
'791fa9818c2e5638b4ef1274d02fdfc92fe9c857e5734311a37e8965bff730812f9b4a33e7c5e60e7d69a70e4a6723dd4068a8ff79535e0f4c15fc58e2b11c2b'
'e2c426c52eaaf3451899f27f5bca22c270cb784d89d77ce1ba17331b2d74e2e73d783f51f8d43263f43a9394c5db8d60bfc0fb0961e014731ab12962cef94868'
'92468119d7a332b4a37f4251739a8a3ffe03560d3e1b07ac1dd7a56af41597336c6fe1ecac3e7b342b36e1e7b2e932ec55b8920d1866f9e3751382a509dbfe33'
'8d8ccf9a2ea43441da9ea85c208ff851d7875a55cbd582e698c63e717eefa31b715808a496696fe6b8961376d4d22b949ea71467ea1b0aba9cd56f333fb923e5'
'ccf2e2dcb3156a3f82169c04e14921a43ed439152bdc93294c4d4111abe9ad4642bad66edba5d94a0906d1911b7f7b05748f1c4e0668293d0c97202152ace40e'
'903272121bc619d2b852c4cd98c1452363ca894fb7bdd28b02545e15cb34dd8a99ace7940c536f2c97295bd2c7f73f078308e820aec96d52e801418fadd3c311'
'cf748b921715911068a2f193a3a39f47cd7479f3991c3dca4ace694dc37ddc0983062b127c03acb7e3f78b626c752267ed862de8a598d42624fa79ddac17d7c0'
'e4db66c8216caa3ce4c265d8e599d7a1c9087559016d42b307484f922e4fc01092acae8f8a322e8beadde6f346eb07d39f3e7d0e9a67539b139a3beea6844ac2'
'0d2e6a40f79ae7f7cea8e353e898f09b5ecb73f4f35800e76e43fb234fe3396cd7acc5a9962cf02392a38593d0acfe9653bf30b36d7eca006375b80b0a67ecba'
'949e84ca1a6a10fb7a8946a03fe0cea913033153d2e98cb3028fe5ec8b066fda60086f3893d5663f1bcdac2308140ab4f2b5cd7bf9a514b071355283ca824c9d'
'b7f5f6ceaba14198838c56197f18d474e6d9383f1bda9f517025e55ac6e9b88c2a55f5861a200041b74447151f40f961451102a1e565f5788ebd0d2efef1b92e'
'ff5ebf68dab9657311fd7dd59f4a76381c25f56d57e6228795fcc86c4531e44617d1e7925dbb829fa73d04c33aa98bfa1a4ad716908c7fa2d5cdf755ba1a57ea'
'9097f8b300e25b91395c44ac8dcb2cf4bfd37ca043da1f6d46d1cceda3bd53f6efb3ecf6f8573960d34deb7180db0e6f392e72fcf72155b098aca8639d8262bf'
'1e317fdd6bc23a6c5dc1c61257016fb9721a7976b7292b9423e61c17c3da3912dcec3dd166d17a1901c7173903d1d6e60ebc7c5b390d320a973177703da8c96c')
# vim:set sw=2 et: