summaryrefslogtreecommitdiff
path: root/libre/iceweasel-l10n/PKGBUILD
blob: 9abf56d19038faecb9e116de939faf8eaf6eff09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>

_debver=34.0
_debrel=deb1
epoch=1
_pkgbase=iceweasel
pkgbase=$_pkgbase-l10n
pkgver=$_debver.$_debrel
pkgrel=1
pkgdesc="Language pack for Debian ${_pkgbase^}."
arch=('any')
url="http://packages.debian.org/experimental/$_pkgbase"
license=('MPL' 'GPL')
depends=("$_pkgbase=$epoch:$pkgver")
makedepends=('unzip' 'zip')

_languages=(
  'ach    "Acholi"'
  'af     "Afrikaans"'
  'an     "Aragonese"'
  'ar     "Arabic"'
  'as     "Assamese"'
  'ast    "Asturian"'
  'az     "Azerbaijani"'
  'be     "Belarusian"'
  'bg     "Bulgarian"'
  'bn-BD  "Bengali (Bangladesh)"'
  'bn-IN  "Bengali (India)"'
  'br     "Breton"'
  'bs     "Bosnian"'
  'ca     "Catalan"'
  'cs     "Czech"'
  'csb    "Kashubian"'
  'cy     "Welsh"'
  'da     "Danish"'
  'de     "German"'
  'dsb    "Lower Sorbian"'
  'el     "Greek"'
  'en-GB  "English (British)"'
  #'en-US  "English (US)"'
  'en-ZA  "English (South African)"'
  'eo     "Esperanto"'
  'es-AR  "Spanish (Argentina)"'
  'es-CL  "Spanish (Chile)"'
  'es-ES  "Spanish (Spain)"'
  'es-MX  "Spanish (Mexico)"'
  'et     "Estonian"'
  'eu     "Basque"'
  'fa     "Persian"'
  'ff     "Fulah"'
  'fi     "Finnish"'
  'fr     "French"'
  'fy-NL  "Frisian"'
  'ga-IE  "Irish"'
  'gd     "Gaelic (Scotland)"'
  'gl     "Galician"'
  'gu-IN  "Gujarati (India)"'
  'he     "Hebrew"'
  'hi-IN  "Hindi (India)"'
  'hr     "Croatian"'
  'hsb    "Upper Sorbian"'
  'hu     "Hungarian"'
  'hy-AM  "Armenian"'
  'id     "Indonesian"'
  'is     "Icelandic"'
  'it     "Italian"'
  'ja     "Japanese"'
  'kk     "Kazakh"'
  'km     "Khmer"'
  'kn     "Kannada"'
  'ko     "Korean"'
  'lij    "Ligurian"'
  'lt     "Lithuanian"'
  'lv     "Latvian"'
  'mai    "Maithili"'
  'mk     "Macedonian"'
  'ml     "Malayalam"'
  'mr     "Marathi"'
  'ms     "Malay"'
  'nb-NO  "Norwegian (Bokmål)"'
  'nl     "Dutch"'
  'nn-NO  "Norwegian (Nynorsk)"'
  'or     "Oriya"'
  'pa-IN  "Punjabi (India)"'
  'pl     "Polish"'
  'pt-BR  "Portuguese (Brazilian)"'
  'pt-PT  "Portuguese (Portugal)"'
  'rm     "Romansh"'
  'ro     "Romanian"'
  'ru     "Russian"'
  'si     "Sinhala"'
  'sk     "Slovak"'
  'sl     "Slovenian"'
  'son    "Songhai"'
  'sq     "Albanian"'
  'sr     "Serbian"'
  'sv-SE  "Swedish"'
  'ta     "Tamil"'
  'te     "Telugu"'
  'th     "Thai"'
  'tr     "Turkish"'
  'uk     "Ukrainian"'
  'vi     "Vietnamese"'
  'xh     "Xhosa"'
  'zh-CN  "Chinese (Simplified)"'
  'zh-TW  "Chinese (Traditional)"'
)

pkgname=()
source=('region.properties')
_url=http://ftp.debian.org/debian/pool/main/${_pkgbase::1}/$_pkgbase

for _lang in "${_languages[@]}"; do
  _locale=${_lang%% *}
  _pkgname=$pkgbase-${_locale,,}

  pkgname+=($_pkgname)
  source+=("$_url/$pkgbase-${_locale,,}_$_debver-${_debrel#deb}_all.deb")
  eval "package_$_pkgname() {
    _package $_lang
  }"
done

# Don't extract anything
noextract=(${source[@]%%::*})

_package() {
  pkgdesc="$2 language pack for Debian Iceweasel."
  replaces=(iceweasel-i18n-${1,,} iceweasel-libre-l10n-${1,,})
  conflicts=(iceweasel-i18n-${1,,} iceweasel-libre-l10n-${1,,})

  bsdtar xf $pkgbase-${1,,}_$_debver-${_debrel#deb}_all.deb
  bsdtar xf data.tar.xz

  mv -v usr/lib/iceweasel/browser/extensions//langpack-$1@iceweasel.mozilla.org.xpi .
  rm -rv {control.tar.gz,data.tar.xz,debian-binary,etc,usr}
  rm -v $pkgbase-${1,,}_$_debver-${_debrel#deb}_all.deb

  unzip langpack-$1@iceweasel.mozilla.org.xpi -d $1
  rm -v langpack-$1@iceweasel.mozilla.org.xpi
  install -vDm644 $srcdir/region.properties $1/browser/chrome/$1/locale/browser-region
  rm -rv $1/{browser/{chrome/.mkdir.done,searchplugins},chrome/{.mkdir.done,$1/locale/$1/global-platform/{mac,win}}}
  cd $1
  zip -r langpack-$1@iceweasel.mozilla.org.xpi .
  mv -v langpack-$1@iceweasel.mozilla.org.xpi $srcdir
  cd ..
  rm -rv $1

  install -vDm644 langpack-$1@iceweasel.mozilla.org.xpi \
    "$pkgdir/usr/lib/iceweasel/browser/extensions/langpack-$1@iceweasel.mozilla.org.xpi"

  # Fix a few broken langpacks
  # https://bugzilla.mozilla.org/show_bug.cgi?id=832060
  if in_array $1 bg csb; then
    pushd "$pkgdir/usr/lib/iceweasel/browser/extensions" >/dev/null
    unzip langpack-$1@iceweasel.mozilla.org.xpi install.rdf >/dev/null
    sed -i '/./,$!d' install.rdf
    zip -u langpack-$1@iceweasel.mozilla.org.xpi install.rdf >/dev/null
    rm -v install.rdf
    popd >/dev/null
  fi
}

md5sums=('a4593936bf1c7a9ec9368ff249f9cc56'
         '71900171caa87cd3d55ffbc3e58308f0'
         '75bcfb2d300d8cd4a8257cdf036f3041'
         '19e4aedfad73916092de4e651b831692'
         'aff229792b9b9600028bab0b5d0d1344'
         '68fb2ce4c7e29a84a24ce81fda2fdd35'
         'da011b0de34655d601ef2ae3bfaf6cb0'
         'cb90c0d44a125e9aecebea5208af042d'
         '57968fab0f419ca1375c02ea310bceba'
         '11b0e340b05f5841f4256e51a58c2612'
         '2f3bcf3d7b65cf966bb9fd9998c07724'
         'd2f99017c4cc1d4da66067b4863d0977'
         '287da1b7c34c6648ec6d0494838a9e9c'
         '334509ebaf3d35705dd97aaecb60d8d1'
         '2cce70f73eb2d921976e1b7f1e821841'
         'b00d1e3ba1155923c7a2c3d18f8c38a6'
         '4135f5f34a8533608d9b427feed133a4'
         '1946bc2fe5372b63097b612213036bb0'
         '408f74e54f40334deb53a7ec754d69af'
         'd986b822cd9b3ad213fc9e5fcfee9c29'
         '5d0fd259d713ed17ee3c6aa510969065'
         '4ddb8a41c25a78ffdf563af5f706bb70'
         '178e071ff20899022a172bc304b3adcd'
         '58b9d195de576d82e76b71d20cf118a7'
         '6b1125d66a63b428893fe972bf7b6a94'
         '089bb928d3dbfd23d86ae1a20b93a762'
         '4804629018528fcc903c46729609a406'
         'e2b2eeec0b2412bc0506a9be7c85b705'
         '96133bfbc6e86655ceba844fd65e2673'
         '9f2884d7d2c0fc3f97c093bdcf57a9c1'
         '16197cf599bb16d3088dd1a3ed2fe578'
         'b8004a8621bdba202e0e5bb254ae92fc'
         '9915734b34ce808c3138f9bc035f8c52'
         'c610997320f8d8c355a14bf4c765c06e'
         '8a5b9479a225737f6699e2a4f5573a75'
         '6d402101d297bff97eb1306d13e9d48a'
         'a9164892d53ffe067f8cd8774efcaf46'
         '5932195e70f6ad8589cd75a88e4779cb'
         '76d4bbebba77be7a6701a6f2ed2e8302'
         '10394ad2f7650c3ca43757f260c1b78f'
         '896121968e4d55f95e0a9186c9ab6e81'
         'f931ca11957e39be9b89a59d5ad35ecb'
         'dd305decb820c37e03ac037199e5096e'
         'e61e467814e7e6924a0f07d2194e08ad'
         '8d7f1243be65f94375fe646f243505cd'
         '194b981125b5f616f87f08c9a41961ef'
         '914d4e5028ccf9f835f34c5d6dc6134a'
         '74867744d2f54cb083c0fd3e4514802e'
         '08a5c5c2796dbc29000d592653ed5518'
         'c1cbdfa540f8e5987f6c228c31cefbc2'
         '20785e3ca421a60eaa940aee11876ca3'
         '59c6c14dbf40826cfca031f8a520f7a8'
         '698146afda5f2144fc362df4daa9ad56'
         '0529da41b7aa827b26e9972d1019758e'
         '5372f1c36eaad3e622bcdb103ef9d04f'
         '86737dafb7dec55fb958005086956406'
         '8512da4480f30d6aeadf6be253413bc9'
         '81d9a5ddc0150a30191f2644f6820fb5'
         'ccab537efb7b3d3b15785bc956b07ec1'
         '2aaf82fd716b60e42357544cad5f1b93'
         'a918c88978d84b60421189a0a161a593'
         '2f4b099e93c99ca3ed0fcf10b1f22ad4'
         '5feac654620807b8637656432200fa49'
         'b4c895901579bd0992882d3905f1b8e8'
         '210bc8317b35b166340b7cc7de6c017c'
         '7995451b8908cbca15eed64b64df15c3'
         '0225bcd946fea1755b93be21e61da3f7'
         '3b29cdb3bcf66b5fb999cd5f4ccb1a78'
         'b94d793b6ccec895a63149972e98d887'
         'b19b5bf4cd68b11ab4880a9e6ea1f1b8'
         '0059daca428ff5784c1f704efe9d9dc0'
         'a1bb10a599c4038627280211941315ea'
         'd05692f0f74bc9b6981287fd28918a04'
         'b34e2dddc386b331105988025547bb94'
         'c53be98d13db3fbd74622f4b34172aad'
         '540b0e474f95b669756e01481ebc69d8'
         'f40164bf3ac730fbe3d31f6399166915'
         '0a0ee498e0d655bdefcb55f78f1f1078'
         '7ced83336eefff094f857172ebc988dc'
         'dc61ce42d6391f16192df383ace55ce9'
         '0dd67a941d44cc3a6ccd310b60063783'
         '246b9a98752606e78652b1dae471f3d0'
         'd7594dbc9c79d1b465388c69e35cde5e'
         '572de00c1a27cf7c78c4d39fa8627f34'
         '7dee1f10fe724b364b67dbf05fae4c8a'
         '25237c91002d6470e3b466246dbb909a'
         '444d4838a8498b982b2fb5127b4cc264'
         '087fadf7f8b110d7bd4d2129febe9e95'
         '452f4d737c0a83c62f7983d6c57f683b')