summaryrefslogtreecommitdiff
path: root/libre/iceweasel-l10n/PKGBUILD
blob: 976bb790290d727d466a52e5a49d1d2c5064ba29 (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
257
258
259
# 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=33.0
_debrel=deb2
epoch=1
_pkgbase=iceweasel
pkgbase=$_pkgbase-l10n
pkgver=$_debver.$_debrel
pkgrel=3
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)"'
  'zu     "Zulu"'
)

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,,})
  provides=(firefox-i18n-${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'
         '196bcf92c298d5d56bb93828370ed14d'
         'be0fabdc6dd384c8bbc807e90ba5530d'
         '23bcb30279662c04551df326d7947fe3'
         '2addde6bc64a7f4f8906ec7f93e37449'
         'cbc53bb740ab6ec1eaae2058c29a3c40'
         'cce1d87097c82c6f6776430ab4659b68'
         'e43bab18250cef333b5c5afe99ecdc4d'
         '0866ee74b1cbe032609aeb0cd5b54b2e'
         'cb9efc757a2f8e3fb905aea4e429b231'
         '72210eef682d85cc39cff075d0b883da'
         'b51a045f6244bcd08b5283544052493e'
         '22f65edf9f8517aec8145620d283fe56'
         'a7246143f4be7c1c53651e48a2cc1b31'
         'b93a42c4edbb880967fea06419991d7d'
         '59668393be1f7a210ffdefc6ef573359'
         'b08d936cd2aba6568693be8d4fcd0e71'
         '047ebacab4324df4b27f7311717b9a00'
         '902b726494cb26a32bd075957fb9f1a9'
         '8ea607cfdf7dca91ca1cd21bc7b449fe'
         '315fb2f87071c33f0cb77811cd4f3241'
         'cc539e5c0c83923b459c7f6777a5053d'
         '76b9c41d0cac2405afd3c8d4699c8986'
         '5de19ab5ddfc826e9d8a83ae337af924'
         '95f78201e02b9962bf44ba0c16a0e064'
         'bec155b97a202aabaf956727a9258820'
         'bf86b66f1497fa8c4930f0c45d74f8d2'
         '330627ee66b886817632237d1e6d7085'
         '5221ae3870f4902c384565cbb67874fe'
         'edff0f78a28fc71a9338e85d2639b402'
         'fb90cf56cf4e303346179d2c638a55f9'
         'beea00d6043d92b55c7e714ae2c31029'
         '31cf3ab221277979d3ca5d5f7f22c5a7'
         '15eca32f43993ad6e401fc4e76d63e6c'
         '79471595c6c2939d42f971c61490b1fb'
         '3702908210903cf0791b75e3431fec9c'
         '413e836ca4f2f1a1818122535422d0d7'
         '5636c95228ad2f414f5c230892da3061'
         'e44bab27c444d0202f5e4488ae0f917a'
         '690a5c312978e7ffb8778c52191a09fd'
         '77e77c3a8d1a3cd16ddddff25eccb97b'
         'd8da755d32b266cff7e517b30d732898'
         'cddd514394ffaef090589e1e951b167c'
         'a0263843c747e46df674661e30ca401a'
         '79bd217ddf1fbddcde75c6ea064602aa'
         '8dae4e2fda93ff93647e1bd73a57e705'
         '2eb5f8f83322d2c7f892bcac42973375'
         '7b2067881735d1e1c280675de1806529'
         '07a2ecd8feaa12b37c5891912b977940'
         'c2ca46afd5458557032d72d16c8ec4ce'
         'e07ed9e99a8ec682283224effab34d77'
         'cb2f44e9a291defdad9a4446ef437ff5'
         'e3098cdc27ad6aed2b3f584ac7bf3e61'
         '4ded5ed8520adf7e795f8bb0bf7dc49d'
         'e1af9e17bcefd7db19b9b99a914a0090'
         '6805934d6d7201a564551bf2e40242c5'
         'e737e3feb08e21c2e1037722413660f5'
         'f3028f9035c6d9b2373f2f2a833f1353'
         'd502b855fdd9e6192076eb481026c7f6'
         '5686cc15ffc3e04ddcbbc7a0de065ff7'
         'c292113c5de21221cd36a3a6b7bac424'
         'd6c4ed1d06557baed459ec3e619aa37b'
         '38e652df5a527b642115dcc51ae779d2'
         '3a98aa1c327f9e08c439b5972763a799'
         'c117e81342912671dd558cf939f83f38'
         '73745963152490bfebb217962b470399'
         '42c21801fe23c517ba48a18b8de27df4'
         '11b0fb3ca10fbc9aae64106b7ee51184'
         '13587617c2c6101658cbb66bb0994a5b'
         'c06decd84f59409e5ca16a2c1273ea1b'
         '2dc2186e49cd1a80affda00e41750768'
         'f084be37817cde6d9933735e1ef8b1a1'
         '1c062e2ee486afe6ca9f7e129d331e33'
         '4cb88b30ae1aaf4b6bfb4b4458f95a08'
         'ff66d330addcdab82cd265630526d67c'
         'f3024aed466fea990492847509042a51'
         'a520d3f9692e8905d9f2f2335c44858d'
         '5afd4bcdd99c24a1309346bd8d2d97f2'
         '4e5aa2f042c853b8ca51c5fd85f6b05b'
         '4e06ffafacccf92cac854e50462fc43d'
         'c1399046a958f364f98538987991c618'
         '6c0ed8a524278738d95b9dc3e4c0c55b'
         '4187a81d4197df6f3abdc7deafb18a75'
         '56681a88fa5089e8f2668bfcf717bfb2'
         '2378d4ce78c1cd47e796ece6c32ff03e'
         'a80179c52616b072366633e78b0a2494'
         '115ecf93d4626b4544edbbb665bb978e'
         'c8cb8be8c6371363f8e898a0f34e62c0'
         '1ee3a6986fbe29be5676554c6f6fa9c2'
         '3899cb081a09605035840e07893975d8')