/[packages]/cauldron/thunderbird-l10n/current/SPECS/thunderbird-l10n.spec
ViewVC logotype

Contents of /cauldron/thunderbird-l10n/current/SPECS/thunderbird-l10n.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2012010 - (show annotations) (download)
Fri Dec 1 09:49:52 2023 UTC (4 months, 2 weeks ago) by ns80
File size: 7754 byte(s)
- new version 115.5.1 (mga#32552)

1 %define thunderbird_package thunderbird
2
3 %define oname thunderbird
4
5 # To update this package: update the spec to the new version and then
6 # rm -f SOURCES/*.xpi; echo -n "" > SOURCES/sha1.lst; mgarepo sync -d
7
8 %define thunderbird_epoch 0
9 %define thunderbird_version %{version}
10
11 %define up_ca_name thunderbird
12 %define lib_name %{up_ca_name}-%{version}
13 %define mozillalibdir %{_libdir}/%{lib_name}
14 %define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
15 %define tbextdir %{_datadir}/mozilla/extensions/%{tb_appid}
16
17 %define xpidir https://releases.mozilla.org/pub/thunderbird/releases/%{thunderbird_version}/linux-x86_64/xpi
18
19 # Supported l10n language lists
20 %define langlist af ar ast be bg br ca cak cs cy da de dsb el en_CA en_GB en_US es_AR es_ES es_MX et eu fi fr fy_NL ga_IE gd gl he hr hsb hu hy_AM id is it ja ka kab kk ko lt lv ms nb_NO nl nn_NO pa_IN pl pt_BR pt_PT rm ro ru sk sl sq sr sv_SE th tr uk uz vi zh_CN zh_TW
21
22 # Disabled l10n languages, for any reason
23 %define disabled_langlist cak rm
24
25 # Disabled myspell dicts, for any reason
26 %define disabled_dict_langlist cak fi ja ka kab rm tr zh_CN zh_TW
27
28 %define use_dict 1
29
30 # Language descriptions
31 %define language_af af
32 %define langname_af Afrikaans
33 %define language_ar ar
34 %define langname_ar Arabic
35 %define language_ast ast
36 %define langname_ast Asturian
37 %define language_be be
38 %define langname_be Belarusian
39 %define language_bg bg
40 %define langname_bg Bulgarian
41 %define language_br br
42 %define langname_br Breton
43 %define language_ca ca
44 %define langname_ca Catalan
45 %define language_cak cak
46 %define langname_cak Kaqchikel
47 %define language_cs cs
48 %define langname_cs Czech
49 %define language_cy cy
50 %define langname_cy Welsh
51 %define language_da da
52 %define langname_da Dansk
53 %define language_de de
54 %define langname_de German
55 %define language_dsb dsb
56 %define langname_dsb Lower Sorbian
57 %define language_el el
58 %define langname_el Greek
59 %define language_en_CA en-CA
60 %define langname_en_CA English (Canada)
61 %define language_en_GB en-GB
62 %define langname_en_GB British English
63 %define language_en_US en-US
64 %define langname_en_US English (United States)
65 %define language_es_AR es-AR
66 %define langname_es_AR Spanish (Argentina)
67 %define language_es_ES es-ES
68 %define langname_es_ES Spanish
69 %define language_es_MX es-MX
70 %define langname_es_MX Spanish (Mexico)
71 %define language_et et
72 %define langname_et Estonian
73 %define language_eu eu
74 %define langname_eu Basque
75 %define language_fi fi
76 %define langname_fi Finnish
77 %define language_fr fr
78 %define langname_fr French
79 %define language_fy_NL fy-NL
80 %define langname_fy_NL Frisian
81 %define language_ga_IE ga-IE
82 %define langname_ga_IE Irish
83 %define language_gd gd
84 %define langname_gd Scottish Gaelic
85 %define language_gl gl
86 %define langname_gl Galician
87 %define language_he he
88 %define langname_he Hebrew
89 %define language_hr hr
90 %define langname_hr Croatian
91 %define language_hsb hsb
92 %define langname_hsb Upper Sorbian
93 %define language_hu hu
94 %define langname_hu Hungarian
95 %define language_hy_AM hy-AM
96 %define langname_hy_AM Armenian
97 %define language_id id
98 %define langname_id Indonesian
99 %define language_is is
100 %define langname_is Icelandic
101 %define language_it it
102 %define langname_it Italian
103 %define language_ja ja
104 %define langname_ja Japanese
105 %define language_ka ka
106 %define langname_ka Georgian
107 %define language_kab kab
108 %define langname_kab Kabyle
109 %define language_kk kk
110 %define langname_kk Kazakh
111 %define language_ko ko
112 %define langname_ko Korean
113 %define language_lt lt
114 %define langname_lt Lithuanian
115 %define language_lv lv
116 %define langname_lv Latvian
117 %define language_ms ms
118 %define langname_ms Malay
119 %define language_nb_NO nb-NO
120 %define langname_nb_NO Norwegian Bokmaal
121 %define language_nl nl
122 %define langname_nl Dutch
123 %define language_nn_NO nn-NO
124 %define langname_nn_NO Norwegian Nynorsk
125 %define language_pa_IN pa-IN
126 %define langname_pa_IN Panjabi
127 %define language_pl pl
128 %define langname_pl Polish
129 %define language_pt_BR pt-BR
130 %define langname_pt_BR Brazilian portuguese
131 %define language_pt_PT pt-PT
132 %define langname_pt_PT Portuguese
133 %define language_rm rm
134 %define langname_rm Romansh
135 %define language_ro ro
136 %define langname_ro Romanian
137 %define language_ru ru
138 %define langname_ru Russian
139 %define language_sk sk
140 %define langname_sk Slovak
141 %define language_sl sl
142 %define langname_sl Slovenian
143 %define language_sq sq
144 %define langname_sq Albanian
145 %define language_sr sr
146 %define langname_sr Serbian
147 %define language_sv_SE sv-SE
148 %define langname_sv_SE Swedish
149 %define language_th th
150 %define langname_th Thai
151 %define language_tr tr
152 %define langname_tr Turkish
153 %define language_uk uk
154 %define langname_uk Ukrainian
155 %define language_uz uz
156 %define langname_uz Uzbek
157 %define language_vi vi
158 %define langname_vi Vietnamese
159 %define language_zh_CN zh-CN
160 %define langname_zh_CN Simplified Chinese
161 %define language_zh_TW zh-TW
162 %define langname_zh_TW Traditional Chinese
163
164 # --- Danger line ---
165
166 # Defaults (all languages enabled by default)
167 # l10n
168 %{expand:%(for lang in %langlist; do echo "%%global with_$lang 1"; done)}
169 %{expand:%(for lang in %disabled_langlist; do echo "%%global with_$lang 0"; done)}
170 # dicts
171 %{expand:%(for lang in %langlist; do echo "%%global with_dict_$lang %{use_dict}"; done)}
172 %{expand:%(for lang in %disabled_dict_langlist; do echo "%%global with_dict_$lang 0"; done)}
173
174 # Locales
175 %{expand:%(for lang in %langlist; do echo "%%global locale_$lang `echo $lang | cut -d _ -f 1` "; done)}
176
177 %if %use_dict
178 # hunspell dicts, allows setting preferences between several providers.
179 %{expand:%(for lang in %langlist; do echo "%%global hunspell_$lang hunspell-$lang"; done)}
180 %endif
181
182 Summary: Localizations for Thunderbird (virtual package)
183 Name: thunderbird-l10n
184 Version: 115.5.1
185 Release: %mkrel 1
186 License: GPL
187 Group: System/Internationalization
188 Url: https://www.mozilla.org/
189 BuildArch: noarch
190 BuildRequires: libxml2-utils
191 # Language package template
192 Source0: %{name}-template.in
193 Source1: update_translations.sh
194 # l10n sources
195 %{expand:%(\
196 i=2;\
197 for lang in %langlist; do\
198 echo "%%{expand:Source$i: %{xpidir}/%%{language_$lang}.xpi}";\
199 i=$[i+1];\
200 done\
201 )
202 }
203
204 %description
205 Localizations for Thunderbird.
206
207
208 # Expand all languages packages.
209 %{expand:%(\
210 for lang in %langlist; do\
211 echo "%%{expand:%%(sed "s!__LANG__!$lang!g" %{_sourcedir}/%{name}-template.in 2> /dev/null)}";\
212 done\
213 )
214 }
215
216 %prep
217 %setup -q -c -T
218
219 # Convert rpm macros to bash variables
220 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
221 %{expand:%(for lang in %langlist; do echo "locale_$lang=%%{locale_$lang}"; done)}
222 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with_$lang}"; done)}
223 %{expand:%(for lang in %langlist; do echo "dict_$lang=%%{with_dict_$lang}"; done)}
224
225 # Unpack all languages
226 for lang in %langlist; do
227 with="with_$lang"
228 with=${!with}
229 [ $with -eq 0 ] && continue
230
231 language="language_$lang"
232 language=${!language}
233
234 locale="locale_$lang"
235 locale=${!locale}
236
237 # l10n
238 mkdir ${language}
239 cd ${language}
240 unzip -qq %{_sourcedir}/${language}.xpi
241 cd ..
242
243 # dict
244 dict="dict_$lang"
245 dict=${!dict}
246 [ $dict -eq 0 ] && continue
247
248 done
249
250
251 %install
252 # Convert rpm macros to bash variables
253 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
254 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with_$lang}"; done)}
255 %{expand:%(for lang in %langlist; do echo "dict_$lang=%%{with_dict_$lang}"; done)}
256
257 # Create dicts dir
258 %if %use_dict
259 mkdir -p %buildroot%{mozillalibdir}/dictionaries
260 %endif
261
262 mkdir -p %buildroot%{tbextdir}
263
264 # Install all languages
265 for lang in %langlist; do
266 with="with_$lang"
267 with=${!with}
268 [ $with -eq 0 ] && continue
269
270 language="language_$lang"
271 language=${!language}
272
273 # l10n
274 cp %_sourcedir/${language}.xpi %buildroot%{tbextdir}/langpack-${language}@thunderbird.mozilla.org.xpi
275
276 done

  ViewVC Help
Powered by ViewVC 1.1.30