Annotation of /branches/R11-stable/extras/firefox-lang/firefox-lang-25.0.1-r2.smage2
Parent Directory | Revision Log
Revision 20076 -
(hide annotations)
(download)
Mon Nov 25 09:25:41 2013 UTC (10 years, 10 months ago) by niro
Original Path: trunk/extras/firefox-lang/firefox-lang-25.0.1-r2.smage2
File size: 2833 byte(s)
Mon Nov 25 09:25:41 2013 UTC (10 years, 10 months ago) by niro
Original Path: trunk/extras/firefox-lang/firefox-lang-25.0.1-r2.smage2
File size: 2833 byte(s)
-fixed MOZ_APP_DIR via new include
1 | niro | 20076 | # $Id$ |
2 | |||
3 | MOZ_SUITE="firefox" | ||
4 | |||
5 | PVER="25.0.1" | ||
6 | PBUILD="r2" | ||
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 | ak | ||
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 | el | ||
88 | en-GB | ||
89 | en-US | ||
90 | en-ZA | ||
91 | eo | ||
92 | es-AR | ||
93 | es-CL | ||
94 | es-ES | ||
95 | es-MX | ||
96 | et | ||
97 | eu | ||
98 | fa | ||
99 | ff | ||
100 | fi | ||
101 | fr | ||
102 | fy-NL | ||
103 | ga-IE | ||
104 | gd | ||
105 | gl | ||
106 | gu-IN | ||
107 | he | ||
108 | hi-IN | ||
109 | hr | ||
110 | hu | ||
111 | hy-AM | ||
112 | id | ||
113 | is | ||
114 | it | ||
115 | ja | ||
116 | kk | ||
117 | km | ||
118 | kn | ||
119 | ko | ||
120 | ku | ||
121 | lg | ||
122 | lij | ||
123 | lt | ||
124 | lv | ||
125 | mai | ||
126 | mk | ||
127 | ml | ||
128 | mr | ||
129 | nb-NO | ||
130 | nl | ||
131 | nn-NO | ||
132 | nso | ||
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-LK | ||
149 | ta | ||
150 | te | ||
151 | th | ||
152 | tr | ||
153 | uk | ||
154 | vi | ||
155 | zh-CN | ||
156 | zh-TW | ||
157 | zu" | ||
158 | |||
159 | # being a little hackish here: | ||
160 | for lang in ${MOZ_LANG_ALL} | ||
161 | do | ||
162 | SPLIT_PACKAGES+=" ${MOZ_SUITE}-lang-${lang}" | ||
163 | done | ||
164 | |||
165 | # unset SRC_URI from mozilla_i18n include here | ||
166 | unset SRC_URI | ||
167 | for lang in ${MOZ_LANG_ALL} | ||
168 | do | ||
169 | SRC_URI+=( ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_SUITE}/releases/${PVER}/linux-i686/xpi/${lang}.xpi | ||
170 | mirror://${PNAME/-${MOZ_LANG}/}/${PVER}/${lang}.xpi ) | ||
171 | done | ||
172 | |||
173 | for subpackage in ${SPLIT_PACKAGES} | ||
174 | do | ||
175 | eval "split_info_${subpackage}() { | ||
176 | DESCRIPTION=\"Mozilla ${MOZ_SUITE} ${PVER} - '${subpackage/${MOZ_SUITE}-lang-/}' language files.\"; | ||
177 | DEPEND=\"${DEPEND}\"; }" | ||
178 | done | ||
179 | |||
180 | src_prepare() | ||
181 | { | ||
182 | local lang | ||
183 | for lang in ${MOZ_LANG_ALL} | ||
184 | do | ||
185 | export MOZ_LANG="${lang}" | ||
186 | export SRCFILE="${MOZ_LANG}.xpi" | ||
187 | export SRCDIR="${BUILDDIR}/${MOZ_SUITE}-${PVER}/${lang}" | ||
188 | mozilla_i18n_src_prepare || die "src_prepare '${lang}'" | ||
189 | done | ||
190 | } | ||
191 | |||
192 | for subpackage in ${SPLIT_PACKAGES} | ||
193 | do | ||
194 | eval "src_install_${subpackage}(){ | ||
195 | local lang=\"\${subpackage/${MOZ_SUITE}-lang-/}\" | ||
196 | export SRCFILE=\"\${lang}.xpi\"; | ||
197 | export SRCDIR=\"${BUILDDIR}/${MOZ_SUITE}-${PVER}/\${lang}\"; | ||
198 | export MOZ_LANG=\"\${lang}\"; | ||
199 | mozilla_i18n_src_install || die; }" | ||
200 | done |