Magellan Linux

Contents of /trunk/extras/firefox-esr-lang/firefox-esr-lang-17.0.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19571 - (show annotations) (download)
Mon Sep 23 14:10:10 2013 UTC (10 years, 7 months ago) by niro
File size: 2888 byte(s)
auto added: ver bump to 17.0.9-r1
1 # $Id$
2
3 MOZ_SUITE="firefox"
4
5 PVER="17.0.9"
6 PBUILD="r1"
7
8 sminclude mozilla_i18n
9
10 # fix split_package_base
11 PNAME="${MOZ_SUITE}-esr-lang"
12
13 # fix mozilla home
14 MOZ_HOME="/usr/$(mlibdir)/${MOZ_SUITE}-esr"
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 ak
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 hu
114 hy-AM
115 id
116 is
117 it
118 ja
119 kk
120 km
121 kn
122 ko
123 ku
124 lg
125 lij
126 lt
127 lv
128 mai
129 mk
130 ml
131 mr
132 nb-NO
133 nl
134 nn-NO
135 nso
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-LK
152 ta
153 te
154 th
155 tr
156 uk
157 vi
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+=( ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}esr/linux-i686/xpi/${lang}.xpi
173 mirror://${PNAME/-${MOZ_LANG}/}/${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 SRCDIR=\"${BUILDDIR}/${MOZ_SUITE}-${PVER}/\${lang}\";
200 export MOZ_LANG=\"\${lang}\";
201 mozilla_i18n_src_install || die; }"
202 done