summaryrefslogtreecommitdiff
path: root/libre/iceweasel-l10n/PKGBUILD
blob: 8e64decddad780c1d559a926158f545a49532df6 (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=35.0.1
_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"'
  '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
  sed -i 's|Firefox|Iceweasel|
         ' $1/browser/chrome/$1/locale/browser/devtools/sourceeditor.properties \
           $1/browser/chrome/$1/locale/browser/devtools/toolbox.dtd \
           $1/browser/chrome/$1/locale/browser/devtools/webide.dtd \
           $1/browser/chrome/$1/locale/browser/devtools/webide.properties
  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; 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
}

sha256sums=('652dddf407ab9b0e00ab8cba7c1ea9b3aff2a8f7519966010fd682ae182281c2'
            '264d52669f8930ba74997e6fb7d63de95fe93d058518806aff210647e4a502be'
            '9b24d64e37164f1e65f64d55e9c96bc451121883a3ea487e7abb064b8d8e9972'
            'af4e35e2369a3eca973455d997e094bd5d548da9308cd29ea1ccfbb2d75044ce'
            'fd94acf77ef8ed1da3209535574769e246b50e617bb1f0f4aaa278efa964f9e2'
            'a0d79d5f360ba7b249e56a9ae265dc145ffce3e702d61a9329d4f23272754c1d'
            'bb97f8d3488559e2679b39d5f1d02d13f99a9fc3b095096097c560cc7b2fe670'
            '7d8224ba66aa3fcee6138bbf58b214a95630ea9d6b1b5ae1d216b15414f1f411'
            '3985900142ab4e1845ec58d838d413e7a387892e4bd073d5c79250921ae1f576'
            'a2a61676a52e65994fe5d22866f07557e5bad680f796a12b58d2f21c088a2477'
            '4b121f1c2c0214e5615474ff8f449292c44294f3be4861abcd6addc590c3a077'
            'de8444ffc486084dd7e7f268a9a73d3c4c43c6255c7be267c8ac6d626b0175ad'
            '55d08a4133610dc6f7bec0be62645275c896e9bd8ac4f165579c2c95cb174284'
            'b280bda9964ebcc788c2186bacb681e05d0adc13e8b2bce129939b33efeb6f76'
            '1c633b9052da07a3a233d4d66a6f18ee382d495455d2456b9212f6c5ed7a703c'
            'a587cc5927944bc9b96bdad71173d97e1fb96211405586a6e364022a950e5264'
            '7410ec9d698a27b0a8d20d461152c248eba019ebd47cf5c8969ad3c6ed062ad7'
            '6a84afcd7a29ed872d866faf90ce39c0945a85585537cb35f5cf71d9a2cd96a3'
            '79f163e0f5daeeb707c0a083570fce2b643536be4448736087718d2bed5425c9'
            '8d47243a3386430dd78e55f917c3488923d51fa6ecdae26bc6f908005cdbe0e2'
            'ecccbfa90833691b02c7e434d64c4bd361a679f7d24d22fa1207e47b76bc7148'
            '55ff4d61d94ca9fad2fc6e032503b577ff35ac99e02a3f14e31affd0f5e7d06e'
            'c60876091de37bf36ded53cfab410e09587f1167e9359e5c52d64665541718d3'
            '09d040f2e337edefb27a5c6608c4a7e3de46a4cafedc68ec6c1e44195596c86f'
            '1a461536f83f2cf011005a8822479a7ab5598d885d779d03b2c613d583f5b9cb'
            '9e3973cd3acbcc6d3ecb4135f8b9e09ce633dea39bfbbc8d6ffc78132696e056'
            '12fe11d4e2c066191860b6632bc2e2953c9ffc9fc846a7f624cf692116f274ad'
            '494d6e8e1805c426266bcc206fcd013f3835aa13b3e429d98771987202f89a6e'
            '60f65fc9984f7b1695d4cabe1b833cbed99cb04911793c2032c490c90dc3a447'
            'ab21b77c1e4f52052c928ef0b846067dd568eaa183e81b76897ffd8864dd5484'
            '5ebace36caa3f049aedd8cb3bc283db89899e8967f886969ad3f0fcc2f98bc10'
            'b354a64505c92da0e4d82d44b45a0a2ec9ed8660077733187f2b089b3ee8763d'
            'a1bbe8919ddfe3ac8813146ac5c2551b95cb15ff9a3c4fdbbcbcd867cd77488c'
            'e933fd3e62e2176855a3e259f8b2e2f12f394aff9c7f2ddb4117cfdd05d2e588'
            '3a4cfaa063bfbdee457bd6896be62b34f813c06ed7a66fad229194f2a9b151be'
            'cc041cc1426d5370b912caa6b0d3576043624cc165c98594916f3b3aad0199d1'
            '7aca3f1e5e2f9a7083f60add6f012db7c5d0fcfb8bc309ea39d957dcf30b8573'
            'cbe180595dc3bad1ad189e79057fecfff5ae69c68611d343b16ad330e8b05f7c'
            '30801cd4f00b9e3ca558d0e4a90f75386f60030cda35b7ae1e9f66dcbf211bfd'
            'ac823291196c574e5c9840a001bc5ef8f951d3df619d7c689a97cf9e3a7a7d0a'
            '2d588e9f25e27d8ceb8725cf068f7892359c240df3020a5750be57af96468af1'
            '0f979cb6dc7988a37d6c4c91be9417366d9892c72b72ed21a4133d53adb0459f'
            '2555c8ed455f89ff08da01fc1f2f8569536e6afa74cecb8a438337904ae7fa9d'
            'ec5f755388c767a5a037dab5376d3bbc350ed20edd1859ccc481cad71bb38ac1'
            '7db4e75c034e2b43e3d4a5af8610fd3ac8111edea24bdcca8036e5dcbb686153'
            '1ba2e3ba94969f2a24dbb09d5cdc38f210cc039ec1303d8c020fae04e633b32d'
            'e8a20ebb3c55de73689cf4bb356de42b3a65acb2e166505d56781b72cebde484'
            'bd071126f609c72bce78ae3df57cd811c43e0b30dd7e1a3b7d2dcefaa93fc3ba'
            '5abb9d28373d86b2f4f54a1e069a30c2cf02cce401608e0ef4a0c239db4dcd2d'
            '0c5ccb0fe96dcd3898b51d8aeeadef55eacaf1ea6f638711918e38411733ac55'
            '0a5d11b0d729876f90631f58651f54070d863d0e5d5f516c5b3ce5b9e1d27626'
            'a0e5a11016dfd2570cfcc5b57ea7744a63db785b58a90a7fb18e9d8297a5f868'
            '44f533591d7f45fa90153e99b7ae9839b55a5981bd011cf2462529aa1a956528'
            'f78ec012c659df4f786134185bbd078d267a90bbf1b8003c52be7fc4007dc613'
            '4942d288bf54bb5d2ca171f549bc4c52da6a6ad77d56f16ab32d1869165b200f'
            'fb623363c01031940dc8cfe2960c393d684a169c819c7d549e46b4597a914123'
            '2ca8e09c39758f9db426c87144e8406ba5ccea9e86e21128ad34d5b5919ec2f6'
            'e6f7b6780e01427d5dee226aca3321475360ef4fb683ba2588173b21a15a8bb1'
            '32fad9a18c6eb9c3f47e7245f7bfdd318413947be16a961db167b84b5037d7e7'
            'a617e2064288ee598c60ce719e9755a78f829591a2a3b7a5086e2a72c7d50856'
            '7ff56071ee5eb3173aaf4be05351d4613dedf64bd9b7f732be49e5677016a54d'
            '09856a8127b58e0892f5b1f44922dafbbeda12820b80a675bc4fa9f0b08eff79'
            'df7e26edd78f2df53630620f6c4babc76f05ce6b58e1cd31fc041e23b5cf4d75'
            'a2d537419e3a04437234bd2aa7b76697a0a884b9a7cf729d700f05081f75db7b'
            'f9388ac736ebcf935bfe9ca8196323996de9e7aad7cb77533dad6a03b89f0391'
            'ce71e5ca682c9a0d74db84f420a046a58637b3607377b4ffa6bf80a76e8f839a'
            '96020217c1c77465e2b6c551877a75f5a44ab121cd19023a814e3fd25eeceba2'
            '41a1b4071aa40b4c6566a18abc466db2ff7d12c1e5050b31238bdd74d3aebf29'
            '4e032a046bf0ba5e01c90e162dd4e0e7731db6b3f2ba28ef68bdba078e936d73'
            'ea264d5c435ad01767d829e0dbd40679937b18288a5bbd2ff79f9f274651511b'
            '4329604a0f5fb47d54136aeb3f96e4c12e41529195c5eaa4ca2504e4396db051'
            '3064b4a90539c3f8d60fa9421c0fb1595dec8b89e0020e81218cee02dd6ce863'
            '1e04eab33f9515ac7ffafb61611013f9b230c3528f8661c1c24c8751e99b0e36'
            '44006da79564048be22adbaead337e58ad2625b97d88ac36a3669528aff47bf2'
            '3f2cbe2667b77af9e662de43810eb60ebb5f5551d28694f03b170952cb86df87'
            'db94344eb14bcbb35ad7fba899de519bfb680d30410e5f13d1008faf79ed8c2a'
            '274d8d7f117e32c5fd29fe182125089b3f9c0266dc95f1895f8ba648fad6c520'
            '0a46cdcf8b18a6e036798282caefc0e5faef8546764bb3aae1076d608396bcf0'
            '2eecdd9250b41917e6307d0f8a58d32520973a7fbbe3fb0923d018dee9c9c42f'
            '692b3a1e98e6eb3bcf865015eeba2ff73bb051e4ca94c286a24d11805b652c90'
            '71e6c3f858936c72d61f4068f2d857bb80b521ae99dbdac9a8aebb08732632ee'
            '8512f5286899f54550114149eaab207afef0db0900a00cf7f5f96b182405248a'
            '0f592ddc51fabb085db64c00df8b340782316b1f8a07dd4d50f17c4426e9db76'
            'a88669b4e2054d995d4561f83703c0a3695805c9dc700ea573e087106f7668d4'
            '845aade113b6de2ac96dd22b709cf77b7e18672fe58fb26028243a0a24a62e05'
            'd59612023a0092e80ca4d3c8cc19b832471e1ae8381aa696194ff8833fe3bc69'
            'aa888db76daa1398ca8a7dc4386a69ffa7d250d4a05c8d8c29fc234f6042976f'
            'bef52f43db6f9125870698ba63ef7d4102c49889283b840cb2364396870e7de7')