Contents of /branches/R11-unstable/extras/firefox-lang/firefox-lang-35.0.1-r1.smage2
Parent Directory | Revision Log
Revision 25212 -
(show annotations)
(download)
Tue Nov 25 03:14:15 2014 UTC (9 years, 10 months ago) by niro
File size: 2820 byte(s)
Tue Nov 25 03:14:15 2014 UTC (9 years, 10 months ago) by niro
File size: 2820 byte(s)
-release branches/R11-unstable
1 | # $Id$ |
2 | |
3 | MOZ_SUITE="firefox" |
4 | |
5 | PVER="35.0.1" |
6 | PBUILD="r1" |
7 | |
8 | sminclude mozilla_i18n |
9 | |
10 | # fix split_package_base |
11 | PNAME="${MOZ_SUITE}-lang" |
12 | |
13 | # get upstream languages via: |
14 | get_upstream_lang() |
15 | { |
16 | local UPSTREAM_LANG="$(lynx -dump -listonly ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi | grep .xpi | sed 's:.*/xpi/\(.*\).xpi:\1:')" |
17 | local MISSING |
18 | local DEPRECATED |
19 | local found |
20 | local i |
21 | local x |
22 | |
23 | for i in ${UPSTREAM_LANG} |
24 | do |
25 | found=0 |
26 | for x in ${MOZ_LANG_ALL} |
27 | do |
28 | if [[ ${i} = ${x} ]] |
29 | then |
30 | found=1 |
31 | # and break here, no need to search all others |
32 | break |
33 | fi |
34 | done |
35 | # if still found=0 here, lang was not found |
36 | [[ ${found} = 0 ]] && MISSING+=" ${i}" |
37 | done |
38 | echo "missing: ${MISSING}" |
39 | |
40 | # deprecated languages |
41 | for i in ${MOZ_LANG_ALL} |
42 | do |
43 | found=0 |
44 | for x in ${UPSTREAM_LANG} |
45 | do |
46 | if [[ ${i} = ${x} ]] |
47 | then |
48 | found=1 |
49 | # and break here, no need to search all others |
50 | break |
51 | fi |
52 | done |
53 | # check missing too |
54 | for x in ${MISSING} |
55 | do |
56 | if [[ ${i} = ${x} ]] |
57 | then |
58 | found=1 |
59 | # and break here, no need to search all others |
60 | break |
61 | fi |
62 | done |
63 | # if still found=0 here, lang was not found |
64 | [[ ${found} = 0 ]] && DEPRECATED+=" ${i}" |
65 | done |
66 | echo "deprecated: ${DEPRECATED}" |
67 | } |
68 | |
69 | MOZ_LANG_ALL="ach |
70 | af |
71 | an |
72 | ar |
73 | as |
74 | ast |
75 | az |
76 | be |
77 | bg |
78 | bn-BD |
79 | bn-IN |
80 | br |
81 | bs |
82 | ca |
83 | cs |
84 | cy |
85 | da |
86 | de |
87 | dsb |
88 | el |
89 | en-GB |
90 | en-US |
91 | en-ZA |
92 | eo |
93 | es-AR |
94 | es-CL |
95 | es-ES |
96 | es-MX |
97 | et |
98 | eu |
99 | fa |
100 | ff |
101 | fi |
102 | fr |
103 | fy-NL |
104 | ga-IE |
105 | gd |
106 | gl |
107 | gu-IN |
108 | he |
109 | hi-IN |
110 | hr |
111 | hsb |
112 | hu |
113 | hy-AM |
114 | id |
115 | is |
116 | it |
117 | ja |
118 | kk |
119 | km |
120 | kn |
121 | ko |
122 | lij |
123 | lt |
124 | lv |
125 | mai |
126 | mk |
127 | ml |
128 | mr |
129 | ms |
130 | nb-NO |
131 | nl |
132 | nn-NO |
133 | or |
134 | pa-IN |
135 | pl |
136 | pt-BR |
137 | pt-PT |
138 | rm |
139 | ro |
140 | ru |
141 | si |
142 | sk |
143 | sl |
144 | son |
145 | sq |
146 | sr |
147 | sv-SE |
148 | ta |
149 | te |
150 | th |
151 | tr |
152 | uk |
153 | vi |
154 | xh |
155 | zh-CN |
156 | zh-TW" |
157 | |
158 | # being a little hackish here: |
159 | for lang in ${MOZ_LANG_ALL} |
160 | do |
161 | SPLIT_PACKAGES+=" ${MOZ_SUITE}-lang-${lang}" |
162 | done |
163 | |
164 | # unset SRC_URI from mozilla_i18n include here |
165 | unset SRC_URI |
166 | for lang in ${MOZ_LANG_ALL} |
167 | do |
168 | SRC_URI+=( http://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${lang}.xpi |
169 | mirror://mozilla-firefox/${PVER}/${lang}.xpi ) |
170 | done |
171 | |
172 | for subpackage in ${SPLIT_PACKAGES} |
173 | do |
174 | eval "split_info_${subpackage}() { |
175 | DESCRIPTION=\"Mozilla ${MOZ_SUITE} ${PVER} - '${subpackage/${MOZ_SUITE}-lang-/}' language files.\"; |
176 | DEPEND=\"${DEPEND}\"; }" |
177 | done |
178 | |
179 | src_prepare() |
180 | { |
181 | local lang |
182 | for lang in ${MOZ_LANG_ALL} |
183 | do |
184 | export MOZ_LANG="${lang}" |
185 | export SRCFILE="${MOZ_LANG}.xpi" |
186 | export SRCDIR="${BUILDDIR}/${MOZ_SUITE}-${PVER}/${lang}" |
187 | mozilla_i18n_src_prepare || die "src_prepare '${lang}'" |
188 | done |
189 | } |
190 | |
191 | for subpackage in ${SPLIT_PACKAGES} |
192 | do |
193 | eval "src_install_${subpackage}(){ |
194 | local lang=\"\${subpackage/${MOZ_SUITE}-lang-/}\" |
195 | export SRCFILE=\"\${lang}.xpi\"; |
196 | export SRCDIR=\"${BUILDDIR}/${MOZ_SUITE}-${PVER}/\${lang}\"; |
197 | export MOZ_LANG=\"\${lang}\"; |
198 | mozilla_i18n_src_install || die; }" |
199 | done |