# # WARNING, READ FIRST: # # This is a special package that needs special treatment. Due to the amount of # security updates it needs, it's common to ship new upstream versions instead of patching. # That means this package MUST be BUILDABLE for stable official releases. # This also means only STABLE upstream releases, NO betas. # This is a discussed topic. Please, do not flame it again. # To update this package: update the spec to the new version and then # rm -f SOURCES/*.xpi; echo -n "" > SOURCES/sha1.lst; mgarepo sync -d %define oname firefox %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %define firefox_extdir %{_datadir}/mozilla/extensions/%{firefox_appid} # *** make sure to re-add esr below when switching back to ESR branch *** %define xpidir https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/linux-i686/xpi #define xpidir https://ftp.mozilla.org/pub/firefox/releases/%%{version}/linux-i686/xpi # Supported l10n language lists #define langlist af an ar as ast az bg bn_IN bn_BD br bs ca cs cy da de el en_GB en_US en_ZA eo es_AR es_CL es_ES es_MX et eu fa ff fi fr fy_NL ga_IE gd gl gu_IN he hi_IN hr hsb hu hy_AM id is it ja kk km kn ko lij lt lv mai mk ml mr ms nb_NO nl nn_NO or pa_IN pl pt_BR pt_PT ro ru si sk sl sq sr sv_SE ta te th tr uk uz vi xh zh_CN zh_TW %define langlist af an ar ast az be bg bn br bs ca cs cy da de el en_CA en_GB en_US eo es_AR es_CL es_ES es_MX et eu fa ff fi fr fur fy_NL ga_IE gd gl gu_IN he hi_IN hr hsb hu hy_AM ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my nb_NO nl nn_NO oc pa_IN pl pt_BR pt_PT ro ru sc si sk sl sq sr sv_SE szl ta te tg th tl tr uk ur uz vi xh zh_CN zh_TW # Disabled l10n languages, for any reason # - no locales-XX package (or virtual provides): # ach ak ca-valencia cak dsb gn ne_NP rm sco son trs uu # Disabled hunspell dicts, for any reason %define disabled_dict_langlist an bs ff fi ja ka kab lij lg my szl ta_LK tg tr zh_CN zh_TW # Language descriptions %define language_af af %define langname_af Afrikaans %define language_ak ak %define langname_ak Akan %define language_an an %define langname_an Aragonese %define language_ar ar %define langname_ar Arabic #define language_as as #define langname_as Assamese %define language_ast ast %define langname_ast Asturian %define language_az az %define langname_az Azeri %define language_be be %define langname_be Belarusian %define language_bg bg %define langname_bg Bulgarian %define language_bn bn %define langname_bn Bengali #define language_bn_BD bn-BD #define langname_bn_BD Bengali #define language_bn_IN bn-IN #define langname_bn_IN Bengali %define language_br br %define langname_br Breton %define language_bs bs %define langname_bs Bosnian %define language_ca ca %define langname_ca Catalan %define language_cs cs %define langname_cs Czech %define language_csb csb %define langname_csb Kashubian %define language_cy cy %define langname_cy Welsh %define language_da da %define langname_da Dansk %define language_de de %define langname_de German %define language_el el %define langname_el Greek %define language_en_CA en-CA %define langname_en_CA Canadian English %define language_en_GB en-GB %define langname_en_GB British English %define language_en_US en-US %define langname_en_US English (United States) #define language_en_ZA en-ZA #define langname_en_ZA English (South Africa) %define language_eo eo %define langname_eo Esperanto %define language_es_AR es-AR %define langname_es_AR Spanish (Argentina) %define language_es_CL es-CL %define langname_es_CL Spanish (Chile) %define language_es_ES es-ES %define langname_es_ES Spanish %define language_es_MX es-MX %define langname_es_MX Spanish (Mexico) %define language_et et %define langname_et Estonian %define language_eu eu %define langname_eu Basque %define language_fa fa %define langname_fa Farsi %define language_ff ff %define langname_ff Fulah %define language_fi fi %define langname_fi Finnish %define language_fr fr %define langname_fr French %define language_fur fur %define langname_fur Friulian %define language_fy_NL fy-NL %define langname_fy_NL Frisian %define language_ga_IE ga-IE %define langname_ga_IE Irish %define language_gd gd %define langname_gd Scottish Gaelic %define language_gl gl %define langname_gl Galician %define language_gu_IN gu-IN %define langname_gu_IN Gujarati %define language_he he %define langname_he Hebrew %define language_hi_IN hi-IN %define langname_hi_IN Hindi %define language_hr hr %define langname_hr Croatian %define language_hsb hsb %define langname_hsb Upper Sorbian %define language_hu hu %define langname_hu Hungarian %define language_hy_AM hy-AM %define langname_hy_AM Armenian %define language_ia ia %define langname_ia Interlingua %define language_id id %define langname_id Indonesian %define language_is is %define langname_is Icelandic %define language_it it %define langname_it Italian %define language_ja ja %define langname_ja Japanese %define language_ka ka %define langname_ka Georgian %define language_kab kab %define langname_kab Kabyle %define language_kk kk %define langname_kk Kazakh %define language_ko ko %define langname_ko Korean %define language_km km %define langname_km Khmer %define language_kn kn %define langname_kn Kannada %define language_ku ku %define langname_ku Kurdish %define language_lg lg %define langname_lg Ganda %define language_lij lij %define langname_lij Ligurian %define language_lt lt %define langname_lt Lithuanian %define language_lv lv %define langname_lv Latvian #define language_mai mai #define langname_mai Maithili %define language_mk mk %define langname_mk Macedonian #define language_ml ml #define langname_ml Malayalam %define language_mr mr %define langname_mr Marathi %define language_ms ms %define langname_ms Malay %define language_my my %define langname_my Burmese %define language_nb_NO nb-NO %define langname_nb_NO Norwegian Bokmaal %define language_nn_NO nn-NO %define langname_nn_NO Norwegian Nynorsk %define language_nl nl %define langname_nl Dutch %define language_nso nso %define langname_nso Northern Sotho %define language_oc oc %define langname_oc Occitan #define language_or or #define langname_or Oriya %define language_pa_IN pa-IN %define langname_pa_IN Punjabi (gurmukhi) %define language_pl pl %define langname_pl Polish %define language_pt_BR pt-BR %define langname_pt_BR Brazilian portuguese %define language_pt_PT pt-PT %define langname_pt_PT Portuguese %define language_rm rm %define langname_rm Rumantsch %define language_ro ro %define langname_ro Romanian %define language_ru ru %define langname_ru Russian %define language_sc sc %define langname_sc Sardinian %define language_si si %define langname_si Sinhala %define language_sk sk %define langname_sk Slovak %define language_sl sl %define langname_sl Slovenian %define language_son son %define langname_son Soŋay %define language_sq sq %define langname_sq Shqipe %define language_sr sr %define langname_sr Serbian %define language_sv_SE sv-SE %define langname_sv_SE Swedish %define language_szl szl %define langname_szl Silesian %define language_ta ta %define langname_ta Tamil %define language_ta_LK ta-LK %define langname_ta_LK Tamil (Sri Lanka) %define language_te te %define langname_te Telugu %define language_tg tg %define langname_tg Tajik %define language_th th %define langname_th Thai %define language_tl tl %define langname_tl Pilipino %define language_tr tr %define langname_tr Turkish %define language_uk uk %define langname_uk Ukrainian %define language_uk_UA uk-UA %define langname_uk_UA Ukrainian %define language_ur ur %define langname_ur Urdu %define language_uz uz %define langname_uz Uzbek %define language_vi vi %define langname_vi Vietnamese %define language_xh xh %define langname_xh Xhosa %define language_zh_CN zh-CN %define langname_zh_CN Simplified Chinese %define language_zh_TW zh-TW %define langname_zh_TW Traditional Chinese %define language_zu zu %define langname_zu Zulu # --- Danger line --- # Defaults (all languages enabled by default) # dicts %{expand:%(for lang in %{langlist}; do echo "%%global with_dict_$lang 1"; done)} %{expand:%(for lang in %{disabled_dict_langlist}; do echo "%%global with_dict_$lang 0"; done)} # Locales %{expand:%(for lang in %{langlist}; do echo "%%global locale_$lang `echo $lang | cut -d _ -f 1` "; done)} %global release_hash 2f6a4d2cf42c9d59626061d45c043817cb220814 %global tarballdir mozilla-release-%{release_hash} %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif Summary: Localizations for Firefox (virtual package) Name: %{oname}-l10n Version: 115.16.1 Release: %mkrel 1 License: GPL Group: Networking/WWW Url: https://www.mozilla.org/firefox/organizations/ # Language package template Source0: %{name}-template.in Source1: firefox-get-locales.sh # l10n sources %{expand:%(\ i=2; \ for lang in %langlist; do\ echo "%%{expand:Source$i: %{xpidir}/%%{language_$lang}.xpi}";\ i=$[i+1];\ done\ ) } BuildArch: noarch %description Localizations for Firefox web browser. # Expand all languages packages. %{expand:%(\ for lang in %langlist; do\ echo "%%{expand:%%(sed "s!__LANG__!$lang!g" %{_sourcedir}/%{name}-template.in 2> /dev/null)}";\ done\ ) } %install # Convert rpm macros to bash variables %{expand:%(for lang in %{langlist}; do echo "language_$lang=%%{language_$lang}"; done)} mkdir -p %{buildroot}%{firefox_extdir}/ # Install all languages for lang in %{langlist}; do language="language_$lang" language=${!language} # l10n cp %{_sourcedir}/${language}.xpi %{buildroot}%{firefox_extdir}/langpack-${language}@firefox.mozilla.org.xpi done