summaryrefslogtreecommitdiff
path: root/libre/iceweasel-l10n/PKGBUILD
blob: 87f0e4d29b2c293d009b2433e6a2991d43eeb80a (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
# 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
_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
  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'
            '3ce40daabd4ce7f7faadaaf6ee6e4eb0217ab4dd9dc10f573ce46387fe0cb60a'
            '8d0dff7d1edb9358e647bd530ebe418455972a24b870d5164369b6b3382f6e66'
            'e8794feb3cb76893e3a4c5489330282452f990e079be3802e66acccd5a90c6ed'
            '5e2d68e9ed07acf1bc33dac6a03258e3652273b660834617aa67c55665841a2b'
            '3b1145fc95731f1d3a7b4557f332d42a30e8d3b42c5874da46d86bc18aa64ed1'
            '61a415227122b8accc856380ec4f1deda0d524c8bc4dbd939228fd8de1801752'
            '67cdb8253146c627c67abfa4db61104634824d5f1811cd23281469764651e414'
            '95f7a0d862b91c46f3f2d4e807461ff2fd8b379e82c75d430c3c9899313970d0'
            '57a30ffbd9fe1fda01436415e69c88aab0ffc1e1f7f4ed3816e3052a4d7b655a'
            '3be3bf9dd85aaa4b4d5a3a350511285537a5063f1cd0254fbaef81a5a3fcdc3f'
            '4febee23d04e8ba3af5f6b433abc07e77d427caae5edc85fffe5682fb93e95e5'
            '5ee7fdb3fa351a306bb2255a93c843a411a64c53b0d53cb16c3b387f08d62dc8'
            '36f7df9c5468c7e0029d06aaffac80f4424bf8be10d9bc390b034224622ac397'
            '563b031fd1db57bdd3ed9efa5d17291595f3542ff444185d87ea14b55ab7ac1c'
            '39dbf82d999bb512c4d0d557617900659599d54ead020c7cc6229f30ae2d10bd'
            '65702c2f85907b4edd8b203d097883e11ff69d8038b403e5185e1ec498808d51'
            '0f4da81df3b34fbbbbae74f0e6a289b11ee2322685c6e063b33e524bcb6c640e'
            'd0e64384eda7c11b28e128a323653209548ad9ce5e326ae7c821fc039f13a519'
            'cd70fb88002419eef3da112769dc9fff4df4bc2834d4f5d31eabcbfc7b5ab720'
            'd02370eebe2e01c95feed722b8dbd8f4dbe46969007d9d0e0daba235e8c4ccb2'
            '1de09a77a26c0fcab9e5e98b1ff664b5810b190b0a1ad600f1643e4066e73bf2'
            '903e73f5599d7b8eaf31e259b146aa00dee9f71e97827a7cdb7bef219440c979'
            '19a35ede9b4ae539f6f27a2205c59286d63fec3c81829b17c4681d5106362650'
            '91156011bf081f153120292026a1eb818726de7be6706c82456d5e6b9c529367'
            '9f09a9dc597b4cb7c343d6d40cd4f045c50eea646ef4e3ae57efec791a114855'
            '7b4de0d4dfe7e3540ebffc424607d83df8eca2a6e44a60096841360a1aa6d894'
            'ac377d2f43743c9dcb8be310ffa431b0baf39396ce8d020e8c822c0832d5a887'
            '1e202db134d87ded77d49bdd7a6c5d57f7bfcb5b07738e94d515b5ec1cd62d23'
            'c9d0b6e9f50170b6d1f7107abbcfcfd9bb3063a5ade43abb5b6a5a27c6c2100b'
            '3e506a1845b16c79e208b8a785e1bf6d637a9956683c926bdf4656fa0a2ace41'
            '1485f5c7acf2192a404944c706b2a69bc85bf72ff3eb7ce96fbae8892a24b67e'
            'f0122983121e1a76ff6c7264e894807f2e8ed771ab6e10fecc188ff1df00c860'
            '1f8a43043b55cf1916c3b09138f0598351aa1b964aa5f500b8d41e8af99fb69f'
            '95b89ca90f5a5fbd4a19e0fb844d3bc777fa12449ad2cf602787dd44fb86462c'
            'e1bab83d683dff719bc9fad92c046c6a9b4be2f5c92fccd09ed1dc27daf8af6f'
            'afb787c19c20ecf6a61b89058cfb8c207407316efe71116f485d78a8b0e214c6'
            '8d33c8990a9f875a3177dbc0ed43b43fbae136abd546ce60946c96d803735dfd'
            '437faf4b42e488fe89e713a91c796afb33ab1588fe756a1643e9f923498214f8'
            'a1dda51b4fdca9e34e86b1fac0f48069c1e20af978e5cf1cd8d2808e222b0e7f'
            '54fd4e7eaba89d8be91b031ce1ae329b07b48d8247f23a5f7b818c02dfee87c8'
            '929413fd291f1d98ddc41be084947fe1843e3d789175c88bf15567a3a384627f'
            'f60abccf4e6b884af83ae1bb5be885de579deea1ec92eebc71b37d6c301499c5'
            'ae65e8c70cf369b89311509bb192d35241b8b5fc23cd11a9ff1e4bdde3a6b2ff'
            'de067635977b9bfb6a71050931f1e0f239d8a1a5f0f46bb36d27710a03573da2'
            'dd20204098d39b0d7c8a3c6153794c75883128f77af865a5f6d67f7880c62585'
            'd7d5b5e493fa3c4dd413507aa395ee79a7fa9ae993955d341541ef3b5af2c24a'
            '851e0a421fa68d6369647fe0519ce54e477702f38d03e94663ec2ccf005a4157'
            '30c53d625d4d962b80dd0504b50bb334769cbb9d24e0342be0f6ec03f60d904c'
            '5551dc12139b7e6cf5aa7fda4df5a215812ea21df84ddf6d13ac3aa653bb4898'
            '4160122fa50ae9b1366a7a43e49d7558c80370615850c6397251dace3307756b'
            'eafe467d330e57d41dd970a588e45d71bba9e5b0843b3532f772b5dc5f690f8a'
            'c3e87dfc9b546532227bfa3365b73181a7e1eb913843570fa7478fd1ac9f04c4'
            '3e832236cf01c94cf456af3d114c357aed62dba968385c25a6005b47a787254b'
            'bf76cba9772cb5bcdfdceade9708f2fa522145daa78580a13500d4827579801b'
            'df9518186a7ce74e69f15f8a6fc28d46bdde6613929beb864f5f7ffb84d51890'
            '10fef94856178f987ed176b571124438b093ab0493fb6cb50367f161af305a70'
            '502690f088e20ab70ea4e5612574cb14045da24a2ff011f64520fd4ea77043dd'
            'cac5d1dcc3ca88f79475c068ce6e2294e8b78b4500ddad35986492fba08a0aab'
            'bc625a8d4fdd4f41dbd196956e0e8ce0dd4b197300b10621f0005fa4afba4871'
            '715dba51789587996ac57f4f62e3cf864d4a9f836a387d6e5d21f9835aca86c0'
            '974f5aec06bbd8c7bf9fdafa58ec6262dd46c4dbc343ec570e4108955871fd2b'
            '16bb5efccabf09fe65001a20c5050662605056397ad8e2e48faeebf92a4a864c'
            'e56358e17c23b2db12fb539a564c077822d393addbc1ba086f9d07417c802980'
            '35c70bc0b3abe01900120c28e898b712e86afc976ef3a49b2864ef8d1968745a'
            '813ffb64c0bf130085ab08b456fbc343edf5393d0ea836c21e87324178de6467'
            'cf3df54ef8c5acb31572f18ed674338c91f3ac46cb046e944465e1931c6d7892'
            '5a6ca80102e977029dd8d7de2e1113f0be7b049b239440d88c65c155ae033b69'
            'c59044ef9600adc3f8ad51e818fbd312f1687c79f7d89c133dcea17fa1ad1343'
            'ce7ccf52f57473f702f5a14f61dcaf4b78064c0b67b58d9126fbd701ee0ab907'
            '6535c0f496fd95df5a2f3b2d1a09c85f02fadff9f38e9fd49f5ad948d1514870'
            '829072d62ed0825861a593b4bab342656a810ca0634084f63b5e85c869039212'
            '33f59be065aacb4df72a1cc71398a4036f5648b7c2bda1160d1f1988c3ac5062'
            'cfb09672f05b74c48155eb5bd09bbe6091530df13f749f8a971ea75f5e416d7d'
            '734a33d5bf1f50e046c38c0a58a84f7625baab3f9a8e9a929085d966865a2d44'
            '79eb12b75c1ceb2143a2d0c9289b7d52ce061998084fe5f07441328af975ff22'
            '407d59fb8424bd96b25e632ea269bfaafa6bf5bf9ee00b790689fad39ddebae2'
            '2ef57100d9c500b93c6a5a87df2248f0ea59f4249d051e8b3af8268c47b1e9ef'
            '3b867f1a10c1e05d6315a7c0d196c454832a497d6dc276ee6a23fe1c065a05dc'
            '4ac85124c4db954b31d114cb7ecefa817234d3fd458e9bac3f65b518ff23ebf8'
            '6803ec95765541862dad5faf8387e92f9201860dda33240b1aa939eb2294a236'
            '4af8aaf8a443e2dbc515486dfa9d6a844912dafa58a38f534dc5cafe2121aa48'
            'a556470c3583937249448d8d46e7cacef57cdc402e9f68f28fd6c0e1ee1aca9a'
            'f0aac24f4bf6397ce5ce7d41a9fe1e76f086da3c282bae00985f2a15ed8b0b11'
            '6282a9b5d520cbea6d02a95d8e4d73e3e59675cba459c7567d94846f67d054e2'
            '99408bd38e511227854d28b19af94771f41d1b78e86142e07b2b0d206052b77b'
            '4a0c312b8b4013f6a3e7a6c6c6a7fa07186ff9e4347a023a2d21ae7f3c64b5c2'
            '5690083d3480da9b5b1ec9f0478a989f32cf2d1742cad94c5c3c4c2ae62afd9b')