Magellan Linux

Contents of /branches/R11-stable/extras/firefox-esr-lang/firefox-esr-lang-31.4.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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