PKGBUILDs/extra/thunderbird/PKGBUILD
2021-12-20 16:47:35 -05: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.4.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
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=('aa442ef886277f5091ebadff907a29451a0ee6542f24adb5c1fb4223193d719c2cb01474d3ccd96067695b19ce3cbf042893b0beaaeb7c65e0660ab5072bf82e'
'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85'
'7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290'
'd2a6a14871eb227d7d2941936949ed5d0517f63fcdd135ff3fe9557b6cddd815c99babd326fcfd504fa9c10134e0db57b12984a8abe13c378f2823041b134e23'
'9d16103bffb0caec1dda18efe4784ef2a680e38305d16e00a833a914085f5505630cec79f59574da080efe01e12a3ee2ef80bebd3c26bce8d7c1255843eed530'
'0f366a7abbc5c8db13eb28b3a1dd0e376785b30d708620f3a4642e620f624cd8786de5714d34f0c10f01bca688cbea4b11da1ffea309574e3be9385e55f0aac2'
'9c5e8482009cbadac5f843bc53560bd9d5d6d85117f86916832a964e8aaec08f8b0d57365c91a5b680edfaa18766f8467ff72bb7b738aaaa369cdb4468e6a451'
'a25443bc776875eb1b83360d90c79be6fd9aa514f71a71cc4d7adc7a26b6074ef09aed3c4b77b32964add76ee4b2b25992add40b52844c113c198e46fd2dbb38'
'4a8a31984d7eb2a277b7bf464a0477380b81b0836afa037af484b4443906e86176c3947463fea6600486c054bdd8b94a5c6d83ac5822eabcbbc0cfff7366ce92'
'b3db289fe6a81191fadf567da66ebfb4acf691e326e23e87172637e495791403b5c77d1c6ae18da9bd0e411e9f1a539f1e567b8f7a04710667ee963d0c7ad728'
'430ba739825d7cc4f546e6769496f27e724ecbd8c30898fa2bf675bed91775710a975bc572bf6ba3ca90efd7ab07524428555be357a92a08bbbe14948fb1826c'
'73252550fadc91b29f75014041b65aca8998efa07354660f8ed32befb8e16618522c00de98952f426c950cbbcd2ba62a49a8d6a815786839256a446acc55f534'
'4a8018e983dfb153f3f8578556a5a3a47092881fa597ddc8e39ba2e7adcf7a1a6ebd06966c53eedd623a567f6d9adb18782eb5a1b5d18ad51a7515d869d45dc3'
'82869097158ccc38c79b3c9a54c13f2d17c135aad49e27fc603b9a09fe89a5865d75f5b0daa0eb6ccbbc199e3217de0938a54627fa5889547ce4fa8de8e1b5c3'
'6b6847223824a0d93c2875c7aab7ffcb522f361dcdc7828e29f8868aabb1ab47ff50c466c3594ce31472a9398d9dfb963fd6c8feda38183851e2b90a04787df3'
'63c13b0256ff83494f70d39cc458b8b1b76d37d57fd0824345ace7cabf3a8bd0afff185320942aa80385d42cb2f246c2fbbe6a30777d591fc37a4ab5756ab7e6'
'a70bf6f691696349f94eef6704a534164cf253baf969fa784ea5b883e9a2b9b00598468106c98212b442d6510e42aed51273b370ef667b5c59a9beb3a22814f5'
'7006a5a03536bf425b61cf815cad32d86dc56a09cf170bb48a39404780decc761a7b06f7f25022f088e4607ce44f8619efb4637e51edbf080221c542f8f26b51'
'465951f7279a2c18aabd26ef5d3b31022167b6c30a7d490163643dff0a2cbf3c723e460f38d05a7285571f649c2396d1d8ecf73488cbb1ca79ee213d7bd4bd84'
'1a78f88a42a81bf4f5c502411f50b7404f9dd9b6ea301e7c24d48461e3a3e980cc98b2c3b183390001c83a3a2854fc941e8b894c6c4e242a556c71f2a24aed85'
'845397a154cd9c26491aba614e2193859343253d8d0c00bc500336e9184d736c9819a7135176b1cdfecdb0ae6be6a4dacef4da858924c3696a748a5bb5286dbe'
'd6b5eb08335f7b36de9be0b2ca6b25d6918ed83aa591c8a67daa4a8f93fbadcfee2466a696926c2c39fd2701d61dd27642d6565d4ce7b17a04992a9a3fe318e9'
'e2c60b1c16e306c89732c8b49c2071598a5e286826e845e21abbf8b4352d3ab342ee77120db99c7dabea4f1420395035e0ee282fa93a8a3cfe43a788b8c5081f'
'efe46649f5db6c68a2cbe2d429ddf8dedfe62e26c0456f6038a6e871abb63bfcabdc4056ca0b61d97318ae4aa924bcbe0a8a08b26471a37a53bf07bb1a20a8e2'
'dbedd79f6cf0fb8b191a22154242dde86ee987d3b7c7edb3d33976aba7c242d71833626bce952d2d3816e24962906e9a7e65e44fdc5d16137f0e7741b23593ed'
'2c3f0d6f0dadd09b4251e296154dcc83791487ffb18984a1556dfec48381b93f8274bd33a7031f261ac029bf600379734233fe58ab847842bd5f621068bcdc9d'
'7b1fd22aef57e9e22f0c5149fb74796a542d502025273e984195c247f0172115a4069198a80b99790278c07e85d4896f5be7ad361b8c532e2df891cd4e4ddf04'
'00051ced5c1186eb9798764c3221344db3bed2436162e5691b74a7ed0f09149e9ee07c671b6a84c95cd3fed348419698b7507a89c9843eb32bd447f929dd599a'
'8c20acb907b2c25327aac6ab47fb03a30a8e407584384b4d8e45dbf99b19c001fcdd49fdf18cec0558422a909ad779d8b2aa2761e9e17ecebba07c50542aa5cf'
'2fee05db8eb7310d672bb8ce22c29e70cab50f9b577a1dbe4da9e7a6194b9aac73a69a84525feaebdff48c16019d4471adcc5d967a198ade3c6eb3ff06b4d0df'
'76e9451fa02a8b4f08bf519cf720e574698542f9a1ca5e85508bd429efb7df4d2897a1a19c36644e91e15260df50adcfeb25ed6d275367a78fb03ff702913885'
'8272a9a22662911afb4082152e2ca07014ceeda6641150a015849d1765e323f035cb5b98ed34d6347f9f685346f137a4dbbd661444734b8e177f438e9b45ab90'
'1c0c51a789f7823421ff0afa8bd775a7980bba7c6dd3882a35ade2ed3436adf84c249333071a51d2de61d46c86b28b91c86bb8548309e95f4e6fcf646272e3b9'
'ef37bf12fcd637542ef6661858ad54ee47f76ca3f0280a4d1df7deb46ded59fbf773f4b3c5684397b0c6dedbadd930c0cac8fe9bb9bc06423d186e35d4fd7360'
'dc0395764b06e3e6123670575bd7845a44cd38a324eac89ed60ecb4e6cd3c6af9a15c60a50c3cd4420acb4521e69f627070074bc1c78be71651d3bfc3b004343'
'42dca44531dc90c70808992eeab9f634001ccdce99efea775b6a7222bc3faf366679019d57c1ad3881c7c7efd87e90d4fde71383188413ff9a082eaf6b1f51b8'
'a4bbf5af715763c86fb85ecd63acfb61ba76dab1c586871e5ffca82bba39d0fadffeb2813dac3922ba2344a8f18f15d1ac9ea2aefeb1b9d41a4544e7bead6445'
'd7f1c29950e6458563c9052041eecf2ae7a097af2567512613dba29ad593b3252d0a9a4a040e3121a0018cf05d168d7d9277a003beabe92345eebf764e6be44c'
'2b054c3a2b6552ab15b680a49f082e45e6d4a3276cdec699be4d0bc139f4e85085a42aeacbd0165962dee7d2a550a51e492e3f3c7515ce11718bea79e26309b8'
'f9098ab0c5fe9a4c9aefd9c2bd79b5b47e4043440cd2f47517396b204c5902d19d5afdbcfcb777148b9e57dcdd2b9b65d8db0baf1f4e2f2d65957223dc1f2142'
'471b97ae72c70b5ef79146b3e1b8ecc76439cc37fa47e0e66edd1c9b353a6f9857833724a70ca2896e17570f2d62a445c845f98c6dde63999ec06a9ddd7f91a7'
'8669879c7b4debfd880d8e477692fe18aa8cada29fb3abd0e0294a32ba9d2aa5de58ab9dd303e36a7757ca8aba301e1149ca30324d32e1efb5c1670088ba42f1'
'd281f98215b92d54e6c5b845e684fa5ac3fb5240a3bbb3ff8f1ae19c863a62c7034e306485eb2724905c0e6a8e66b74bc6d60815f8b1a3b2378b69e50e1a8d70'
'a2e14b4c91e7c2afbc06df8a0114e16a0a9b0416e0d2d08d81d5f3c07d384c9f812ff6f124e47dd0c26124abf3aa20d70242d71884f6502ca4b450a6496d22f0'
'f9df949af74b019f037c063ac1b8c1d047a4b66d64d9be9733727c0039b2a154b0bc08f5b5ec33ed4caa5f9bc10d9ac90888330da858d5870f68b9e6558444a2'
'bd1d02ba42a8807d7053e98b83a5e8e085c7cc0b50c6a48ed222da8c859ec5434979ed7ca292165f80aa148386e4e835ea782fc1bc1f0ba32cf769b116ed4465'
'd86b2f004498a4a73a4791d537792eadbf260fbdca611c9475a03345ce50e0dd87241d98524277267df4f2ed0b2ced4445634432841aaa613d64d4d471f901d9'
'491908db3b145e5707500e584d8ecc9f0659345a712e223bb4719f6547909d0891ba52340a1eee03678c74c6861b55d8bd961e84e7bd5895f3a63fc21434346c'
'6f1ec506660b8eede4a46a10f1c373559bf95ad8cb598b93d6cdc44ab03a021164399ad5ae2776fe679277fda38a9b5aa2f2eed7a677d8ecaaa5881da0c25e00'
'5227a55d2c91553d96b6cba2e06b473c9018ce11522b2d0e141bdfe4a43803cbb82d7b6ca0d3c35203a762f37c08e5924c26cdea321b1f5951e30e19e7d32ca7'
'385d598e4d49ffc401c5f106894b57385471cf4fd29b28e7d9b66cc7852e8bb1d83fae04f0bb2658b1513e340526750019cde73463308a73324c6b52bfdece04'
'8c9ae02a81340bac2981555f03b9bf490d6e63abab3569db11de34adef4e3e6397acceec9ec8a6fb3e105a84f94d2622b9aae422e3c0079adcd5b71bbc951738'
'7b94912cc2867d4105a404e60239584714dc1cedc5e22fa31246f65e30fb28eb564d0b9f38b782b2df4ce7d5cfbe16051258a986ddc61a5051ff1c7c2ad86463'
'a686efb134d53985ab8cafa7b2d9668190dcd0d08aa1c505489b443606eafd7cb70bb7b40acb03d2f77f49ed8eaab8e7467b43ae8404702136248e5dcc9b7af6'
'3133603ff09377c35e9f1a915a033243ca3446be23e1fe680ccb998de0069f21333ee9349c5f0426352691fd7e80b93a98f0333257cd18c00104a82c3217872b'
'4073fab914b5b8e519ffad67b2f354b69a0e957cf541ee2d3c4c045164af2969654599e4baa0ed10dda101bf5887da8812cc4397ae00f70aa4525c0cbf04ae2c'
'f56d1efaf7b25f36ece50196a1034eee1f9d4bf86c82e03c458e575fd6f9b23a444ddc1fc810cb234a77c456db2726ed4e6d41194555a68537f1bef587f0919b'
'44c49e0d28020229801538d65e4c531e9d78190e8d6ff09806a0369f62781c45b53be865d3447a86b3d7d6ebccd8e9ca29e658dde96748fd659ec89fbd8c7c6c'
'672920d69a2dbcd9835e8ddd9bae53fbd93879fd097ff059cfb7dccb7467d7f547a504744e8a69e8aec5bd5b4e8018de4922164d91b2626063ba02cad71ab06b'
'6e40f6e3e17acc0149c3949f11fa62cf98abc8e9e7fdcde1a16c437c0496093c3ae23101331df9f2e5709e52c36153abfa0da729eff148b5554617c1838f3596'
'67aecdb4d232a9f91beeeb613077fa805b57a9e76fc68e3446adb7c1560d3e1f1f5f1137242a75426ef1bef1113bdc5257966f4e6e2f9c61f7fb02369354f4ed'
'43391233895d6f3cc54eb8d500bba07d36f745bdd3668c8323bfb66b19520586ff57ea2fb482ce108553218504f73cc74320eda948c7eacf3d9433b47010b8db'
'd6065783ec5e047306a083db728ce1b5f83c48a2021700aa1e6af5f38e592c22a404a0940f794a238bd9fc514d3f2e0b3d613b20b9e8c86ed17107ee848bb36a'
'7a5c576587919466d1fd5424e054a0c2207de979a8bfef1d32bd60ea2e35d1bd199f8ea3617521b0a6d9bb8abc9b5e4a796c084760adf0fd47dbf95fa2e564b5'
'907f641363331b4d9170b1a71fbe8a9f793a0520137ec84eb5d925f097b9d204f9f2f0a8094c04668f5a6ad371809b03480a19ac8df6db8b64e23cf609fcd543'
'62dd3f25eadad68192f9e9a2e24580ba19638bca97ad243d2546c0912cd2db1107303678ec68f06bf7205f182582449ab030dac56371987626ef9fdc7d0c6523'
'33905cb91ecddcf63240886fd51dba3454edf23fbf09a3ec19d8ea0585b5e54bcc79dd37b3e87d1e571bb5c4c317fb732546d51917b9e41b47339e3819a8fa91')
# vim:set sw=2 et: