Contents of /trunk/extras/firefox-esr-lang/firefox-esr-lang-38.1.0-r1.smage2
Parent Directory | Revision Log
Revision 26542 -
(show annotations)
(download)
Sat Jul 4 12:24:00 2015 UTC (9 years, 2 months ago) by niro
File size: 2914 byte(s)
Sat Jul 4 12:24:00 2015 UTC (9 years, 2 months ago) by niro
File size: 2914 byte(s)
auto added: ver bump to 38.1.0-r1
1 | # $Id$ |
2 | |
3 | MOZ_SUITE="firefox" |
4 | |
5 | PVER="38.1.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 | az |
79 | be |
80 | bg |
81 | bn-BD |
82 | bn-IN |
83 | br |
84 | bs |
85 | ca |
86 | cs |
87 | cy |
88 | da |
89 | de |
90 | dsb |
91 | el |
92 | en-GB |
93 | en-US |
94 | en-ZA |
95 | eo |
96 | es-AR |
97 | es-CL |
98 | es-ES |
99 | es-MX |
100 | et |
101 | eu |
102 | fa |
103 | ff |
104 | fi |
105 | fr |
106 | fy-NL |
107 | ga-IE |
108 | gd |
109 | gl |
110 | gu-IN |
111 | he |
112 | hi-IN |
113 | hr |
114 | hsb |
115 | hu |
116 | hy-AM |
117 | id |
118 | is |
119 | it |
120 | ja |
121 | kk |
122 | km |
123 | kn |
124 | ko |
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 | uz |
157 | vi |
158 | xh |
159 | zh-CN |
160 | zh-TW" |
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 |