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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 134088 - (show annotations) (download)
Tue Aug 16 18:31:59 2011 UTC (10 years, 1 month ago) by fwang
File size: 7646 byte(s)
new version 6.0
1 %define thunderbird_package mozilla-thunderbird
2
3 %define name mozilla-thunderbird-l10n
4 %define oname mozilla-thunderbird
5 %define version 6.0
6 %define release %mkrel 1
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 http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{thunderbird_version}/linux-i686/xpi/
18
19 # Supported l10n language lists
20 %define langlist ar be bn_BD br ca cs da de el en_GB es_AR es_ES et eu fi fr fy ga gd gl he hu id is it ja ko lt nb_NO nl nn_NO pl pt_BR pt_PT ru si sk sl sq sv_SE ta_LK tr uk vi zh_CN zh_TW
21
22 # Disabled l10n languages, for any reason
23 %define disabled_langlist gu_IN mk sr af
24
25 # Disabled myspell dicts, for any reason
26 %define disabled_dict_langlist ar be br_FR es_AR eu fi fy ga gu_IN he ja ko mk pa_IN tr zh_CN zh_TW
27
28 %define use_dict 1
29 # We moved to pointing mozilladir/dictionaries -> /usr/share/dict/mozilla
30 %define use_dict 0
31
32 # Language descriptions
33 %define language_af af
34 %define langname_af Afrikaans
35 %define language_ar ar
36 %define langname_ar Arabic
37 %define language_be be
38 %define langname_be Belarusian
39 %define language_bg bg
40 %define langname_bg Bulgarian
41 %define language_bn_BD bn-BD
42 %define langname_bn_BD Bengali (Bangla)
43 %define language_br br
44 %define langname_br Breton
45 %define language_ca ca
46 %define langname_ca Catalan
47 %define language_cs cs
48 %define langname_cs Czech
49 %define language_da da
50 %define langname_da Dansk
51 %define language_de de
52 %define langname_de German
53 %define language_el el
54 %define langname_el Greek
55 %define language_en_GB en-GB
56 %define langname_en_GB British English
57 %define language_es_AR es-AR
58 %define langname_es_AR Spanish (Argentina)
59 %define language_es_ES es-ES
60 %define langname_es_ES Spanish
61 %define language_et_EE et-EE
62 %define langname_et_EE Estonian (Magento)
63 %define language_et et
64 %define langname_et Estonian
65 %define language_eu eu
66 %define langname_eu Basque
67 %define language_fi fi
68 %define langname_fi Finnish
69 %define language_fr fr
70 %define langname_fr French
71 %define language_fy fy-NL
72 %define langname_fy Frisian
73 %define language_ga ga-IE
74 %define langname_ga Irish
75 %define language_gd gd
76 %define langname_gd Scottish Gaelic
77 %define language_gl gl
78 %define langname_gl Galician
79 %define language_gu_IN gu-IN
80 %define langname_gu_IN Gujarati
81 %define language_he he
82 %define langname_he Hebrew
83 %define language_hu hu
84 %define langname_hu Hungarian
85 %define language_id id
86 %define langname_id Indonesian
87 %define language_is is
88 %define langname_is Icelandic
89 %define language_it it
90 %define langname_it Italian
91 %define language_ja ja
92 %define langname_ja Japanese
93 %define language_ka ka
94 %define langname_ka Georgian
95 %define language_ko ko
96 %define langname_ko Korean
97 %define language_lt lt
98 %define langname_lt Lithuanian
99 %define language_mk mk
100 %define langname_mk Macedonian
101 %define language_nb_NO nb-NO
102 %define langname_nb_NO Norwegian Bokmaal
103 %define language_nn_NO nn-NO
104 %define langname_nn_NO Norwegian Nynorsk
105 %define language_nl nl
106 %define langname_nl Dutch
107 %define language_pa_IN pa-IN
108 %define langname_pa_IN Punjabi (gurmukhi)
109 %define language_pl pl
110 %define langname_pl Polish
111 %define language_pt_BR pt-BR
112 %define langname_pt_BR Brazilian portuguese
113 %define language_pt_PT pt-PT
114 %define langname_pt_PT Portuguese
115 %define language_ro ro
116 %define langname_ro Romanian
117 %define language_ru ru
118 %define langname_ru Russian
119 %define language_si si
120 %define langname_si Sinhala
121 %define language_sk sk
122 %define langname_sk Slovak
123 %define language_sq sq
124 %define langname_sq Albanian
125 %define language_sl sl
126 %define langname_sl Slovenian
127 %define language_sr sr
128 %define langname_sr Serbian
129 %define language_sv_SE sv-SE
130 %define langname_sv_SE Swedish
131 %define language_ta_LK ta-LK
132 %define langname_ta_LK Tamil (Sri-Lanka)
133 %define language_tr tr
134 %define langname_tr Turkish
135 %define language_uk uk
136 %define langname_uk Ukrainian
137 %define language_vi vi
138 %define langname_vi Vietnamese
139 %define language_zh_CN zh-CN
140 %define langname_zh_CN Simplified Chinese
141 %define language_zh_TW zh-TW
142 %define langname_zh_TW Traditional Chinese
143
144 # --- Danger line ---
145
146 # Defaults (all languages enabled by default)
147 # l10n
148 %{expand:%(for lang in %langlist; do echo "%%define with_$lang 1"; done)}
149 %{expand:%(for lang in %disabled_langlist; do echo "%%define with_$lang 0"; done)}
150 # dicts
151 %{expand:%(for lang in %langlist; do echo "%%define with_dict_$lang %{use_dict}"; done)}
152 %{expand:%(for lang in %disabled_dict_langlist; do echo "%%define with_dict_$lang 0"; done)}
153
154 # Locales
155 %{expand:%(for lang in %langlist; do echo "%%define locale_$lang `echo $lang | cut -d _ -f 1` "; done)}
156
157 %if %use_dict
158 # myspell dicts, allows setting preferences between several providers.
159 %{expand:%(for lang in %langlist; do echo "%%define myspell_$lang myspell-$lang"; done)}
160 %define myspell_de myspell-de_DE
161 %define myspell_fr myspell-fr_FR
162 %endif
163
164 Summary: Localizations for Thunderbird (virtual package)
165 Name: %{name}
166 Version: %{version}
167 Release: %{release}
168 License: GPL
169 Group: Networking/WWW
170 Url: http://www.mozilla.org/
171 BuildArch: noarch
172 BuildRequires: libxml2-utils
173 # Language package template
174 Source0: %{name}-template.in
175 Patch0: fy-si-xml-validation.patch
176 Patch1: pt-PT-xml-validation.patch
177 # l10n sources
178 %{expand:%(\
179 i=1;\
180 for lang in %langlist; do\
181 echo "%%{expand:Source$i: %{xpidir}/%%{language_$lang}.xpi}";\
182 i=$[i+1];\
183 done\
184 )
185 }
186 %if %use_dict
187 %{expand:%(\
188 disabled="%{disabled_dict_langlist}";\
189 for lang in %langlist; do\
190 echo "$disabled" | grep -q "\<$lang\>" || \
191 echo "BuildRequires: %%{myspell_$lang}";\
192 done\
193 )
194 }
195 %endif
196
197 %description
198 Localizations for Thunderbird
199
200 # Expand all languages packages.
201 %{expand:%(\
202 for lang in %langlist; do\
203 echo "%%{expand:%%(sed "s!__LANG__!$lang!g" %{_sourcedir}/%{name}-template.in 2> /dev/null)}";\
204 done\
205 )
206 }
207
208 %prep
209 %setup -q -c -T
210
211 # Convert rpm macros to bash variables
212 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
213 %{expand:%(for lang in %langlist; do echo "locale_$lang=%%{locale_$lang}"; done)}
214 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with_$lang}"; done)}
215 %{expand:%(for lang in %langlist; do echo "dict_$lang=%%{with_dict_$lang}"; done)}
216
217 # Unpack all languages
218 for lang in %langlist; do
219 with="with_$lang"
220 with=${!with}
221 [ $with -eq 0 ] && continue
222
223 language="language_$lang"
224 language=${!language}
225
226 locale="locale_$lang"
227 locale=${!locale}
228
229 # l10n
230 mkdir ${language}
231 cd ${language}
232 unzip -qq %{_sourcedir}/${language}.xpi
233 cd ..
234
235 # dict
236 dict="dict_$lang"
237 dict=${!dict}
238 [ $dict -eq 0 ] && continue
239
240 done
241
242 # Patches
243
244 %check
245 # All install.rdf files must validate
246 xmllint --noout */install.rdf
247
248 %install
249 rm -rf %buildroot
250
251 # Convert rpm macros to bash variables
252 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
253 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with_$lang}"; done)}
254 %{expand:%(for lang in %langlist; do echo "dict_$lang=%%{with_dict_$lang}"; done)}
255
256 # Create dicts dir
257 %if %use_dict
258 mkdir -p %buildroot%{mozillalibdir}/dictionaries
259 %endif
260
261 # Install all languages
262 for lang in %langlist; do
263 with="with_$lang"
264 with=${!with}
265 [ $with -eq 0 ] && continue
266
267 language="language_$lang"
268 language=${!language}
269
270 # l10n
271 cd $language
272 mkdir -p %buildroot%{tbextdir}/langpack-${language}@thunderbird.mozilla.org/
273 cp -f -r * %buildroot%{tbextdir}/langpack-${language}@thunderbird.mozilla.org/
274 cd ..
275
276 done
277
278 %clean
279 rm -rf %buildroot

  ViewVC Help
Powered by ViewVC 1.1.28