# Maintainer: Andreas Grapentin # Contributor: André Silva # Contributor: Márcio Silva _pkgbase=icedove pkgbase=${_pkgbase}-l10n # https://developer.mozilla.org/en-US/docs/Mozilla/Calendar/Calendar_Versions _calbase=iceowl _calver=6.2.5.1 epoch=1 pkgver=60.5.1 pkgrel=1 pkgdesc="Language pack for ${_pkgbase^} and ${_calbase}." arch=(any) url="https://wiki.parabola.nu/$_pkgbase" license=(MPL GPL) depends=("$_pkgbase=$epoch:$pkgver") makedepends=('unzip' 'zip' 'mozilla-searchplugins') # note that there is currently no localization for Iceowl: # https://bugzilla.mozilla.org/show_bug.cgi?id=1469678 # might be temporarily fixable through this: # https://gist.github.com/progandy/ce857358c4f3b8eb09887a085e4bea30 _languages=( 'ar "Arabic"' 'ast "Asturian"' 'be "Belarusian"' 'bg "Bulgarian"' 'br "Breton"' 'ca "Catalan"' '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"' 'kab "Kabyle"' 'kk "Kazakh"' 'ko "Korean"' 'lt "Lithuanian"' 'ms "Malay"' 'nb-NO "Norwegian (Bokmål)"' 'nl "Dutch"' 'nn-NO "Norwegian (Nynorsk)"' 'pl "Polish"' 'pt-BR "Portuguese (Brazilian)"' 'pt-PT "Portuguese (Portugal)"' 'rm "Romansh"' 'ro "Romanian"' 'ru "Russian"' 'si "Sinhala"' 'sk "Slovak"' 'sl "Slovenian"' 'sq "Albanian"' 'sr "Serbian"' 'sv-SE "Swedish"' 'tr "Turkish"' 'uk "Ukrainian"' 'vi "Vietnamese"' 'zh-CN "Chinese (Simplified)"' 'zh-TW "Chinese (Traditional)"' ) pkgname=() source=('brand.dtd' 'brand.properties' 'region.properties') _url=https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/linux-x86_64/xpi _calurl=https://ftp.mozilla.org/pub/calendar/lightning/candidates/$_calver-candidates/build1/linux-x86_64 for _lang in "${_languages[@]}"; do _locale=${_lang%% *} _pkgname=$pkgbase-${_locale,,} pkgname+=($_pkgname) source+=("$pkgbase-$pkgver-$_locale.xpi::$_url/$_locale.xpi") #"$_calbase-l10n-$_calver-$_locale.xpi::$_calurl/lightning-$_calver.$_locale.linux-i686.xpi") eval "package_$_pkgname() { _package $_lang }" done # Don't extract anything noextract=(${source[@]%%::*}) _package() { pkgdesc="$2 language pack for Icedove and Iceowl." replaces=(thunderbird-i18n-${1,,}) provides=(thunderbird-i18n-${1,,}) mkdir $1 unzip $_pkgbase-l10n-$pkgver-$1.xpi -d $1/$_pkgbase rm -v $_pkgbase-l10n-$pkgver-$1.xpi #unzip $_calbase-l10n-$_calver-$1.xpi -d $1/$_calbase #rm -v $_calbase-l10n-$_calver-$1.xpi local localizedRe localizedRe="$(cat $1/$_pkgbase/chrome/$1/locale/$1/messenger-region/region.properties | grep '^[^#]*localizedRe')" if [ -z "$localizedRe" ]; then localizedRe="mailnews.localizedRe=" fi install -vDm644 $srcdir/brand.dtd $1/$_pkgbase/chrome/$1/locale/$1/branding install -vDm644 $srcdir/brand.properties $1/$_pkgbase/chrome/$1/locale/$1/branding install -vDm644 $srcdir/region.properties $1/$_pkgbase/chrome/$1/locale/$1/messenger-region echo "$localizedRe" >> $1/$_pkgbase/chrome/$1/locale/$1/messenger-region/region.properties #cp -R $1/$_calbase/chrome/calendar-$1 $1/$_pkgbase/chrome/ #cp -R $1/$_calbase/chrome/lightning-$1 $1/$_pkgbase/chrome/ # cat >> $1/$_pkgbase/chrome/de.manifest << EOF #locale calendar de calendar-de/locale/de/calendar/ #locale lightning de lightning-de/locale/de/lightning/ #EOF sed -i -e 's/thunderbird/icedove/' $1/$_pkgbase/manifest.json sed -i -e 's/Thunderbird/Icedove/' $1/$_pkgbase/manifest.json rm -rv $1/$_pkgbase/chrome/$1/locale/$1/global-platform/{mac,win} rm -rv $1/$_pkgbase/chrome/$1/locale/$1/messenger/searchplugins cp -av /usr/lib/mozilla/searchplugins $1/$_pkgbase/chrome/$1/locale/$1/messenger cd $1/$_pkgbase zip -r langpack-$1@$_pkgbase.mozilla.org.xpi . mv -v langpack-$1@$_pkgbase.mozilla.org.xpi $srcdir cd ../.. rm -rv $1 install -vDm644 langpack-$1@$_pkgbase.mozilla.org.xpi \ "$pkgdir/usr/lib/$_pkgbase/extensions/langpack-$1@$_pkgbase.mozilla.org.xpi" } sha256sums=('83b8a12a36933df22c3e3143400e93f1bffee81cd3fb3d4e2b6a9cdefaf67c2d' '5f041a40b8f4ba552d8412d6934ea2bc872be90e684a6856e83bc1bdedc22d11' '817c1f6219f5b9a00820e4d67cda3d7c388e6af11e8498bd912dad0381b5e01b' '48a9486f2a8d9cf752a70a40415f945cbc98c399271610b31ffcc611a484b822' '79fe80b9f3ae69b9be3544b995b3dad0bb4a5d3cc61a6746b0842f2832d76e67' 'e769773144ee1b307d1a470e41b7cd316a183d4693b5133c4dcb16bcb14e159c' 'd2c2f3d581e3933ff031046c2e53dab634fdbacd1c97dbb6ad0cb46f6632d3a9' '5905973fc8a9b7ee7b62eeddb4713541f7d2de3c1c0a6df6dac17af2be25e77e' 'f358dea9a8b3130d435d7368841ec1b86e2e5886c45585f0c092c5457a2eeed8' 'c213b4776ff91b5bfeecb4eb6d4b9196f1bde6730de4d41cda18ae21fe8e7753' '474ae008a29e915a6ad616b2df903d8de7d22c10a454c3c274c594f770552508' '407eec30bf0517aa3367297bcffa83343242c4cfd4008a13db0a33436d2e1f6c' '04f30e489da7b3b0f597cad5643da66b416854101e038b1ea0406b54aafe2e85' 'b1fc40715e4afad34fe9af1cee47915826e81462b7404c63ae12dbee5b43e640' 'c7ea945ac0d7ee85704e99e8341df1660eebda07264828827fdb227fb56dd1d8' '7ba2c508a7950fd288fa33e6844ea683da3c742679958c36f2df162ea041430b' 'bb09a6d3f9174818db6266246b357a63fe5a61e1cefd01ab2c586d72cf26145f' '8a4744a1fd5904cf4604112f0fd954fedfb8115da7de5a74717574be50edc40f' '447bab400fb9608acfd40af97ea10f39c17ce3f00bf76dd17234c1a0a5df3603' 'dd5107728763963f5f45ef947f1d2688fd14db26f1130a5b3c25ff5542777834' '87a4eec31c303aba7cf8bcfbcdb0e56df96114559d7838d1a42affb5c05c7169' 'ff0e70b4db354b37c4e566d5f61bfc5cdd66c9213ad1a81997fd1033af93e4f5' 'ddf27da78bbc2770d542c177870b18452e640d810d66a74b48ce8965bbe3acc4' 'afe0fe699bd7c269a12322429b73c2385bd19f640febe6689c4cacba0f1df6da' '118049e259753a1e4e20abb5570822e00e23301512dc357dbad4509a0ece7467' 'fc827de7a9e15c7b1558c4fdfdc462969a22e65cbd0fa74836e38ce4f0f761a6' '4b49991186cd7b14bf3ea79180d53864d25f47637e0aef626be4418792ef1dc9' '24b44537ae355304f162d2759a7cb538d7ba685e5ec18fa07c3ed6733766f2ef' '179caa7e0f5815d17ba720833e9d2064e84dbf7be41831421d5b3555bea700d0' '06de85242b20a5512cbace871d7fec081d0f1193ddbaff057c94bc6c49a324d6' '675005041e067f5674f3db5b8fe91df621b43df432ce783f0acbfa96ea5ee89d' '64891576a55b26890a8c7f53576f90e94e28dd016fe08f6d58ad39397959b9ed' '576828494f607915fee9ae3594b2c01604bd13f507c3089bff900daa99a4aaf0' '70bda724d95677b895da841ed8f906e45f3b0cefed7aa0ffbfd3fded4e795b00' '2b20a1a613088994fc8e6e54416471bca7d1ff50acea91bff2929b4c19e9a930' 'c280005ade853a070e94a4a011a27dc8e1f8bee224296092b0d08b4e1e02f9e2' '27da88697b6afaaef4bbe8bbc3dcc583098c7b7ab49d721395aa06758ab79c8c' 'c96967983a33e4cc68f833da49fe61e04455ec2d17e8f13142e8ceeadf0bdc5b' '3a72e20cacb168cb408edd6268bdb3b03cc46a02ca9bb4684a5d1750c8f7d284' 'a0dbdd8af474b72fcbdbd2b4e5e5d0c86e5ca76acc1f10c8f2de70c2c3fa21a0' '11a32a57c474cae558c30d8cd12a0d0c0940465cb62e0255fe4448afd8b5da00' '8b90d33d6a270cfc36e646401625be1e9b3423c11a215ac79d9ec8de2fbe80e7' 'c503676ed6ef3bc1e9a62eb1de8a3d22703317df2ac8b6efbdd8afa6528a210e' '6c6faf6c90d36d0eaeb062b21c4f5ab6a6a917cc359986bafda6ef45b50699fe' 'ba550898b6d0fa4eb15560186825a9bb47ada5106a0588477b9c5e6f7c5547b3' 'a94b1a6596588b27cb1bd86c64c02e12241d5dea4ade5f60c277bf0d3e50d27c' '55a4342b37692cf9ee5ae0852180e0cbdd5d8193e10c3a47743293d84928cfb2' '90d0e971b0570e06ef6c46fdd0030ffb4f24eeb3e8c3ab59ffccc3758e206549' '2e34027286e0e752fad4029a8db7ff152d4fe1205c6124c785ea2d15d9f2cb37' '4c7f96e2179f79bb9bea6aa006f02db96ec06ed0fa1679093f9916733728210c' '92290a50a89931f20b7a42a7a82115b6031d3ab6427a9de9348bc51572f08053' '8d613384ffc8a38d492bad5122f3b7ca17f39f061f5dfb55f878877b85287eae' 'c8bc3624c77fd89d46ea9af56e2afd0e3815ba51dfe20f5279b1f9c4b52875af' '3e17bc58bc4e63e9a7130b4a7fb5c217dc12f2a42da5aef5ace7a2127b418fa1' '3f4b819a9f00c9fe464e1b5490c53feb9ec6262db186d7fb07ed2db1e75a5b68' 'ab6920d5215c990960123fcb3edfcc53c5aaed4db0a4b8ca03a28a8e15779f67' 'd4da46b8ca926ccddc483909af3c1b88bc3793a10dbf2ca76e23b162ddec108f' '0eabdd8b7a717dcb9b30322477d0603d6c026c836619aa10c3e458e926d1a86a' 'a174ef10eb1ecb7cbe34a6d049dacd3133d795a7ea80b0f8ea3e80f389a5bc6c' '6e8dff164b39255e28cdf2bf6ee23cd3c87f4c4c6595f6f2c152b1e1adfda8b2' 'd1192d6939e7d42580a929d6daab9129488b86bcbfd3b768a2ddf89574879494')