Magellan Linux

Annotation of /branches/R11-stable/extras/firefox-lang/firefox-lang-32.0.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22874 - (hide annotations) (download)
Tue Oct 28 09:05:54 2014 UTC (9 years, 6 months ago) by niro
File size: 2829 byte(s)
-release branches/R11-stable
1 niro 22403 # $Id$
2    
3     MOZ_SUITE="firefox"
4    
5     PVER="32.0.3"
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     be
76     bg
77     bn-BD
78     bn-IN
79     br
80     bs
81     ca
82     cs
83     csb
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     ku
123     lij
124     lt
125     lv
126     mai
127     mk
128     ml
129     mr
130     ms
131     nb-NO
132     nl
133     nn-NO
134     or
135     pa-IN
136     pl
137     pt-BR
138     pt-PT
139     rm
140     ro
141     ru
142     si
143     sk
144     sl
145     son
146     sq
147     sr
148     sv-SE
149     ta
150     te
151     th
152     tr
153     uk
154     vi
155     xh
156     zh-CN
157     zh-TW
158     zu"
159    
160     # being a little hackish here:
161     for lang in ${MOZ_LANG_ALL}
162     do
163     SPLIT_PACKAGES+=" ${MOZ_SUITE}-lang-${lang}"
164     done
165    
166     # unset SRC_URI from mozilla_i18n include here
167     unset SRC_URI
168     for lang in ${MOZ_LANG_ALL}
169     do
170     SRC_URI+=( http://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${lang}.xpi
171     mirror://mozilla-firefox/${PVER}/${lang}.xpi )
172     done
173    
174     for subpackage in ${SPLIT_PACKAGES}
175     do
176     eval "split_info_${subpackage}() {
177     DESCRIPTION=\"Mozilla ${MOZ_SUITE} ${PVER} - '${subpackage/${MOZ_SUITE}-lang-/}' language files.\";
178     DEPEND=\"${DEPEND}\"; }"
179     done
180    
181     src_prepare()
182     {
183     local lang
184     for lang in ${MOZ_LANG_ALL}
185     do
186     export MOZ_LANG="${lang}"
187     export SRCFILE="${MOZ_LANG}.xpi"
188     export SRCDIR="${BUILDDIR}/${MOZ_SUITE}-${PVER}/${lang}"
189     mozilla_i18n_src_prepare || die "src_prepare '${lang}'"
190     done
191     }
192    
193     for subpackage in ${SPLIT_PACKAGES}
194     do
195     eval "src_install_${subpackage}(){
196     local lang=\"\${subpackage/${MOZ_SUITE}-lang-/}\"
197     export SRCFILE=\"\${lang}.xpi\";
198     export SRCDIR=\"${BUILDDIR}/${MOZ_SUITE}-${PVER}/\${lang}\";
199     export MOZ_LANG=\"\${lang}\";
200     mozilla_i18n_src_install || die; }"
201     done