summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n/PKGBUILD
blob: 8f9c3d2efec1d4318344c80397e737c239ceef6d (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
# Maintainer: Márcio Silva <coadde@parabola.nu>
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>

_pkgbase=icecat
pkgbase=$_pkgbase-l10n
_pkgver=31.8.0
pkgver=31.8.0_gnu1
pkgrel=1
pkgdesc="Language pack for GNU IceCat."
arch=('any')
url="http://www.gnu.org/software/gnuzilla/"
license=('MPL' 'GPL')
depends=("$_pkgbase=$pkgver")
makedepends=('unzip' 'zip')

_languages=(
  'ach    "Acholi"'
  'af     "Afrikaans"'
  'an     "Aragonese"'
  'ar     "Arabic"'
  'as     "Assamese"'
  'be     "Belarusian"'
  'bg     "Bulgarian"'
  'bn-BD  "Bengali (Bangladesh)"'
  'br     "Breton"'
  'bs     "Bosnian"'
  'cs     "Czech"'
  'csb    "Kashubian"'
  'cy     "Welsh"'
  'da     "Danish"'
  'de     "German"'
  'el     "Greek"'
#  '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"'
  'fi     "Finnish"'
  'fr     "French"'
  'fy-NL  "Frisian"'
  'gd     "Gaelic (Scotland)"'
  'gl     "Galician"'
  'gu-IN  "Gujarati (India)"'
  'he     "Hebrew"'
  'hr     "Croatian"'
  'hy-AM  "Armenian"'
  'id     "Indonesian"'
  'it     "Italian"'
  'kk     "Kazakh"'
  'km     "Khmer"'
  'kn     "Kannada"'
  'ku     "Kurdish"'
  'lij    "Ligurian"'
  'lt     "Lithuanian"'
  'lv     "Latvian"'
  'mai    "Maithili"'
  'ml     "Malayalam"'
  'mr     "Marathi"'
  'ms     "Malay"'
  'nb-NO  "Norwegian (Bokmål)"'
  'nl     "Dutch"'
  'pa-IN  "Punjabi (India)"'
  'pl     "Polish"'
  'pt-BR  "Portuguese (Brazilian)"'
  'rm     "Romansh"'
  'ro     "Romanian"'
  'ru     "Russian"'
  'si     "Sinhala"'
  'sl     "Slovenian"'
  'son    "Songhai"'
  'sq     "Albanian"'
  'ta     "Tamil"'
  'te     "Telugu"'
  'uk     "Ukrainian"'
  'zh-TW  "Chinese (Traditional)"'
  'zu     "Zulu"'
)

pkgname=()
source=('region.properties')
_url=http://ftp.gnu.org/gnu/gnuzilla/$_pkgver/langpacks

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

  pkgname+=($_pkgname)
  source+=("$_url/$_pkgbase-$_pkgver.$_locale.langpack.xpi")
  eval "package_$_pkgname() {
    _package $_lang
  }"
done

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

_package() {
  pkgdesc="$2 language pack for GNU IceCat."
  replaces=(icecat-i18n-${1,,})
  conflicts=(icecat-i18n-${1,,})

  unzip icecat-$_pkgver.$1.langpack.xpi -d $1
  rm -v icecat-$_pkgver.$1.langpack.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@icecat.mozilla.org.xpi .
  mv -v langpack-$1@icecat.mozilla.org.xpi $srcdir
  cd ..
  rm -rv $1

  install -vDm644 langpack-$1@icecat.mozilla.org.xpi \
    "$pkgdir/usr/lib/icecat/browser/extensions/langpack-$1@icecat.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/icecat/browser/extensions" >/dev/null
    unzip langpack-$1@icecat.mozilla.org.xpi install.rdf >/dev/null
    sed -i '/./,$!d' install.rdf
    zip -u langpack-$1@icecat.mozilla.org.xpi install.rdf >/dev/null
    rm -v install.rdf
    popd >/dev/null
  fi
}

sha256sums=('816fbc139595c924ed8ab719955d13364beda0eaf631ab679d7aa32462b4278b'
            '75ad3b6f73afc0186046b042fdbea35962e0da5d621f308783b7cc4b6bab4797'
            '3a142028e90b4d10ce2458753a3a1d22aaf540edc4dc3fec1fa8eb3daf8214c7'
            '954346d995584eaed081f758ff310480662ea6baaa3a913867f2a2c3dcb82271'
            'fae24a79b1a76379e651f14825ebf40a91c19712a8d267f5bd474650162877de'
            'aeb33ce69aeeeb8b2d0058899bd074177bedbf765156c4d751185edad306b5a5'
            '2b0401a81f61f1fd900536a38c30d9d7f2ee0a6709f58e9281e12e48b8bb20b3'
            '6e926d054be858e15c313eb812dbe74c5a75aa3257ca693f255a0ee624bf6a01'
            'e29fe7286beeeadced4bb644b748c638ad32f3f791d223aebaf83d0ac2a4abe2'
            '2e7d5ce6e316eaa82506e221e27ba2b785772233011ba1dcc25ff5b693bde9dd'
            'f44e2efa9e8314affd24e29f7f639368fe43e91458be0433dd1121b1dfbc27b1'
            '72aea1b22dd86d09db2647a334c0619efb77774a17bed51f862b60a753ac2e65'
            '125f09b878ae949ac1db0f6686fc534fc2e52f410aee8538b3497c751ba24ac3'
            '52092eee647f47e2ccd7bdaf17fb0fdedce141e4419a45a09601e57a3bc1f4cf'
            '027bfa25fbda15af04e5c2965b229ec42d4cb30e203108113aff3895cfcd2d60'
            '214d9fbd76ce5e4bf247938761e52219ba6370ef23504467d35ee72ab27118d7'
            '554386360ed78f128b8f9e5d781decdc22c43f0b2da2eca51a12017a9575e8c3'
            '60f5d85b1b6036654b5e141c019e23073e49d95e117cd3e48a83c35a45e0bea5'
            '6ec862fd24b66d0e1adb3afac2304f6fa3bb2d2ccf7ce98ed96908f7125cabd1'
            '087d7c85e46825e459569d161646cce867e58accbbfe097cc3296084c29d7a69'
            '60b86ff5c57c57aa941347278c7a52307241d50bac72f862f68a7b118b47d524'
            '70d67287ac89a539af34e7e88e9fcae80b678e4a919d9dbc772d7711712de313'
            'c405258d7fe875ebf8c9486cc7144863d2bc42f382b91a900e9be0a500f7092d'
            '0358cabd6c25674981e0f1f564bbe7491bd8b47834703b1afdc9e52be8bf7c44'
            '6f6d83d62c7e9b5135b0dd85e33fb0657a638009281e9932c88f1780dc67a24b'
            'e9e781536b446ac6c801dfb00139d682be3f05f9c14280107fbbdffb4ccd942e'
            '1d2fb1b81338ac6fc7a552ff809f587a8c5268c74b1c495e06e65be86045393d'
            '8a564feec6669fe79d6cec92bb2f07b3e92ea0d718e58b5e40237e20c117057d'
            '2aee274220f409b3210d42d955a9c00811a93513f2e1d9707d82f7a04472024c'
            'bb5d3e3381e0339141f0c0bf57cd18d7b59da905412cc44d730a546ff6388928'
            'bc8d1837532c4b5ca62d251113bffbb166cb3a6a8b9218bf168a9efe2234a760'
            '31eb7b0305c50788a2a744d936d5644277d9dcb2c4bd7c4a25bbacf4165f73c3'
            'b0274ad9951e13908b811c09048b48e96f1a0486044b8b6bc7f344d41a9d1112'
            'a6307333f1918be9c1985a25a768d533c2d9417088729d967842141afb83d08b'
            'f4b5a3099f7d507ef70f0537450ba4f0d1f383c9c7a99675606b914387e22c93'
            'e310c7a68283a3160b705bac8c64f59257e3cf552d0755e1ebb2694d551912f8'
            '404626f0cf706db523426ea65e7cc2e101d25c859ba31b4faf23a5d191817156'
            '0b343af40d361ea6209a4399e6ead0b250126aec42bd3befad0e5dadf4d55ea9'
            'e88473d92936c4b4c86988af32ea8ac2f6132ab1e9335920a6cc11b03bf728c1'
            '460fe08777455232e020b699f0da51511e9b62575082cd2ddcf5b934fcd99c2e'
            'bc5ddabeeaaa960f4e9a8a2ce0a33e656bf7a6e158c830e38e2c72260297c6b8'
            'ddd71a5a90525242eaec80ed426a4d2c7c1577cd7db2eb3edac07acb85b0a89c'
            '7e9039fa356260ab2e2fbb5ae73f6503cb102f46ccd70c1922cca1ce495b0b94'
            '45443c64b216b476d7fb9bd0a03aa4069718e93b093dd6cf0e3090b600704249'
            '3da5559ec7f5ffaf7b9e8e1e62f234fc63916a6be35ca8d5efa7857332c2ab8f'
            '97c1e100777099c38daae913d87c567554bac1494c588d478ec1fd03d37adde5'
            'd7fbd96680a31480a70fc1fcfb7f84836dad45fa57ede24d2ad93df2e26e9bad'
            'a9fc5ed350a417c38ecda39623502f2901a095377c3f8995a28dfe55ce21ab52'
            'fdf75ce2838af444dc737508e5262fd8575579d5d73b0467408d1e0dfebdbf41'
            'e2f03f67cde25c89d25ca5fa5c565a91f5ebbbe912642adc4edb955b1acc7849'
            '1d5797102d9610ec4faf05d6cfb7f05106286f172a44436cdbfcc4c4c7d90759'
            '3a7caa3a58af708135c996603fa35a46b3f7d12a397bdda971963b8ee37f14af'
            '1319e8db747e517af71c63f7e80b4ee55137c362f38477c30fb9bb3734a1e2c1'
            'aa990edb911c633f09a73e797cff60d2a5bd3b227292cd6acb6b36f80e67721d'
            '868a8497cfe0e4a1bee49a9cc02a2854b4f79c956d2aebf08265bd929a479045'
            'e34ea94c89892b41493d3806cf9e689aa302dde4d0a8041041a14fd8137c0904'
            'a152e417463079522db77332b3e54cede90cb737955e1ce3d507e2e6e36f0e6e'
            '6b13d79a8b3e1b6b875359aa968bded50c2f6fb68eb6dbfb895900f8071ea732'
            '0b8f105e853159e035dfd5eadceb822bdc33db403b57ea1bdc20f9705bf904ca'
            'b417b141277402d55f32bc48b27911d08a381b7c68381dcd9de3ab3e80a10369'
            'a5b0fd320a65b7c58080d92e184c8ce33e3e706001f68045d09ff6051fd51f7f'
            '695700e5485182d1dc56287245bf9815dafab8e8024b1c3147319ee8c42530a9'
            'dedc2d4bd1ac97bbd4070024c1a4a061e914fae755fac8069881669cc46095e9'
            'ac7ed07c661e21ddc39095da7b74bab6254031020bc42c30cd1dbca24242139d'
            '767fc108f5d963e80bdc551773d54384c6ea02ecda6956fca97f23b65cc2af46')