# 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.6.1 epoch=1 pkgver=60.6.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' 'a879b3ff88ab2e52e4bb1f3dd8a35414edc628816bf9cb92ead94eef484a3a5b' '0be7f06cc87b483938efa3d3c110798e58793658733e46631a865166b88b26d9' 'ad4f86312d35abc15a346be329ffa265a3bc5c4484d2d40a552bd93c77e01bec' '5294f3178dca24f0cb4b0eab5310f079cd71978cdb2ee24eccbfc26fe50d0118' 'edfb3b467fdd6b7284cd82da2cf52e178c41122230ddec7e6733e0a7869b9bc3' '3249c79fc73f37eac9426f89b05ec33ce75eb000229b5825ebbd560929af5f36' '288130fc829ecb31d2b97937abe02a3b75da203f183a5bf8bbbaadea07fe559a' '0aa3c17718657d7e08b505b400319615fa1cdb17af7eda419c05834a4a3ac14a' 'c19bab23dfbccd7d82cd3bf6093d7fbad55e9c240022d730a668ebbf357d5f40' 'd0252fdf965216508da5b9d22e4936782920d481cfaec14ad9f72c0b5663b343' 'b9aca7914f30b007054eea1d9ccbefcce48714f1876c1df49ae3917804d4703b' '02701c3439bb30be0514e6f8cc2926d539b0185ad370d1cfabe4085b7173ca61' 'f9d94f2afe04b4db63c75bea25b27ab535ede8bf5f0b72010941c1514bc09fc0' 'cd4e27b988a5e7d05ee7732e60a3bdade0925ce328ee69dade1df7fa5097b643' '9179ece6bf2fad65eb3755fb1f6182516ddd32fde3494575fcba901a293bc5dd' '75505b8a67174bb3902274f5f69ab9d004ff83bb12366689854d3386482825d0' 'bcd812c09cecc18f7d66223f34ee45bd5d9c74c2e8aceb1bf8ed05f1c25c3c8d' 'd2b39526d7d6bbd5a5d0db96b716b362d2334285461b235faa11529e8d28c54b' '2e48775b7685f3382a13925a7b1591d1a0bc49918aa0faf4ccac936f48c2176f' '19770d4c35c7825c4bb5cc836a6b6be9df0321cbc3e99c268550ace616506892' '38bc3813d50c63d60967b1e0fa5303450e02a88e7ced7dd35a1ab38bdff404ce' '8fdde144b7e2e89b087936d7b550d6c076606482fd5df53263b43918ee3dc8ec' '010c4cb2cb8209a42a1497f46569acc7e9c4e1349be0df49f1c64192d890b857' '50f79f72d223f71eb816bbf3fd2f968502a60a7d60fce961148444b7abf22e1a' 'd947fe600d8f6568e7812c10b5d8d75cf093135cd7b2f6141946529173f4504d' '8066b945451949c6a650829639483eb2c5d372a493c66407367908e461132efc' '75717745268f77cec94f0caad32d2691f7094b1f71176f45594b101580b729e4' '68dee0ab55862bce758129e8f5a2fd83e6aaf4bc38ce94d92d568b9faa028e1c' '8bc8c2645726af5d7c514e0652e46b34deabdeb31f33fa2db2d58ccf7e7e6595' 'e47c8a9110bb9dfe8679daa68a69a53f76ae97f36b8b341d0884741dd59b1cde' 'da887d9b1d68f48576562d7418a02ea07d147be6cf0481945aa02f5a6ab61f26' '47fa92facdef121cf045f0e7ff4691e18110d0053de22c808138888479e6870d' '8e9b74f8f0a909fdd85783290cfdc824d22655f3668d7641c37aa61c40615a9f' '71c5a12ca4ec2b5c9fcba4b07f03cc2b99b72355d36f34f0b191515b75b8029d' '9c7627a5e4179427eafb21763eab075b68e8d742ce98e0ab78535469e32e9208' '68c25cc2e6b27a1f9452ed0b6a737c92aecb1fd970ebcb9879392b94934457a8' '2daaf709aab3d7e9a573a209f3d05b5b08b275e2ef63b74482da2b413489a340' 'cb28bfadd84b2f68410c87516fdb67208250b597bdd2abb0d3cc5030b881f5cb' '1847ab6c66d2281b1680cee5daf2d8af35af4307d5bc2dfc572667ad933366e6' '29e8b4c7b2f94f283f3e945285880888c094c48ec1351a6789181a90d63a7bea' 'adf6e2965fbe7b90f409843f7802c05906f326f6889f8f2b98ab45b8aa480aa3' 'ad9ceae7b5e13367d0e476cb613d0fa8e94357095d041be4a5f9a51747013467' 'fddd1ec21b420de9608d361e31a41a07f804eaef6addb1de55ac13bc6b4e25ca' '9a63c1b0428de9ee5b74c844ee0093fc7d836f70b9839775bbdb297aa3baa208' '7044cbf358922cd41f3162f7a22688850f848302318139de11507c8b6d101c45' '7f92d15fd72798755249aa2233f18feaba03eb1cfce1b0a3ac2bab9689646f52' 'ff6bc5ced01e6c161d8567578c8dc9af4fb8182b7ec98dcf4d7d97e040a1294a' '9187181d1b0f3adbb8dc24b527c8c1f169b6222394a48d29cf8c39e94adb1d6a' '215717e6bd6e4653fd7ac821bbbae633c5774ea45669f7c0d70522858b293499' 'ca89e4de909b0593d505065cbf95b935ea15fff5f4524d1736f1854ef7d59009' 'ad720c66df8ae2f3de22484a679a61efd74fb7def530bf309ffd011e7b9ee44c' '5f2e171391127d5990825325ba2472bc271e0224efc77b155e098d8d71e0118f' '5c3533278afe77aeb8a3bc238ed6f4aabe677e0ce00d9374456e0178b679f3a2' '1c8eb3f3879628034a57050b00ce85c07bd41ad37449470d574f7bd9be41c75c' '53fd6e77157cced9fe2f7054bc4cc03d9a333755f5164e6680155b9d6bc83e8f' 'c36cb4f65ba512952b09da75126bae94d0e3d1ce0a7375cd94c0b3eaa1ba25c9' 'fe6f2fea713a97fb956b55d768d9f1299bb820fd7d81b02ef5ff277b558119dc' 'da445281f759e36356543aa786a159adac4e16a35d5148863fb5843090d67a0e')