summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n/PKGBUILD
blob: 86e4a85fcfb1ef1266000ca24245adc722b220ce (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
# 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.5.0
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'
            '76d732118cce5aec0dcef428f40520b4903d0ae8ab6ca144d739c39a42915966'
            'd70a33b90dafb94229f14b9ca189d6127eccaf0e0f572b481647f6913bd08cde'
            '8a64c04141a81bed8e3fe58804ccebeb11a1bd2f5a12981de88ebcecc5517ea6'
            'b52fd69edfcbcea1ed17d93b62e427927e954dac22906d2324f59ccbe9cd295d'
            'a825df2c33c1aa0ccde9999d9b52c9fd0e67697d89a05dcf58758a66fb3ddae3'
            '4a6ad48b96d374ee13ac7e7a8aacb4f00315334af2be54459d80c32097fb2fc7'
            'f721addef959de1d967bab5fa609297e93e2622f389d3c36d9643a8c27835590'
            '937f828e80f12f7bb1c2a331daf1712c1c1766daf5a85e52d9823c0c2db38213'
            'cb9d8ac6dbcb04e01ce8c8c1c485112dbeaca4333f90cfd1e17b6a13bc784572'
            'a6a3e9f6a4a85c3512bf42fbbbb0dd69e85c1924b15cba9e6b585245b1ecafe6'
            'd15d8498631bcadb907530e0c0eed53f836a17ca17559b27c7bc75e4de0f6da6'
            '1d5490b09f7608c4cbf8928e1e6e883a8bd094c890a90b3230e665c3f37ffbb0'
            '453a8ab746e3423849dde82e564ddb889923f4a296c87de617d860a25a97ce7f'
            'c403f8104a4b8f2f4dfc91800e37571508fc669957aa75b8d073f94e12ebeda7'
            '2c4ef487d8881ba1e3cff9b5dc8c69c9fb6d2e0466dbbab9106b5ab77243f2c9'
            'f9981118be7ae82f8e721fd65e06c40b40563db87994031cc34f09a180261fae'
            'da07121581072eeeb985c7ac1bd95055fe9d465c7628d80382a41bb8fa216f6e'
            'ac0725fd02f2f4134ca75f2e53394982058cadddfbb1100f535a27cf35b6f3b1'
            'bdcf31a05f6a4056cd4d3f5209e9674d3e5db053db21f0cde1aaee31821b9735'
            '543d400d3fa86858865794dd3ee333cb68ab413b36cec02beb51490916c45f2d'
            '18976ddd195d4c111944d72dd22506a8d9f131beb5441e530de31e42a03d45e3'
            '30add78c2e94869337e7355e596b9d393bbad28a0641154b80a561c03bef62d7'
            '1d7c0c734c9f8b609e04118d28de29cd7d183b25d87419390b8af0785ba479f8'
            '90096f91dd58e44d382e8d31d251b7da400dd0c0637fecd8a32eee60a4d4be68'
            '4fb34c4455d62fcf0f8d62cdb24cb26e709a6c11b97f8eabd00efb129480d210'
            'b156693ab5623c67a8776440574b372011ef9a7a13337422045d7943083fafa7'
            'd3b99148edb1ef6a16931c1d93e498a70c36ccfab87f01eed20db42f9d43a1b9'
            'c0be9362711fc9727bb47b795098a8dca09d85c00a6257f055d2d95deb2a83d0'
            'e9bbe0748fa0f8696cff920664f9255e4d684aa8a750a2c0b33dfe3376a096c0'
            '25a42883b1e2b3cb8505857296acdec8e7b24f1ffe47329a41d8b02490d3afda'
            'd4351a398b2db6c9cb9d54627c19be062b142e86800be9ebe09d0fdeeb47e035'
            'd370c13ff93119910e622c4b26aaa314402ab310e064ce11f2cf0e9df5148a79'
            'debb62a99c1b5216efb45d5a91e984f2a7384a9db243015d1c73ebe9c8e2eb03'
            '58581e0afa6a78c71487db4698f6555457a28edc0caa71d22a0a4941b9c309e7'
            '0b554941ab62af95d331e79328dee4d3f86191d97ef0b5d79c04c0d5a2a9ba4d'
            '7d56576169d9d387ce12a675d70af37decebdeb81bf92e62cc19e2d79a7ea57a'
            '124cbbf25bd4e12c6394fa02fa8942d08d7185561e7669ddb783fe4886e5bd8b'
            'a2e1741e104cc68a6700f5b8bd7894a1b22767dfaeee5b88a4bbcc9888229f5a'
            '7b278a1afbcc79587e5063a5865089c36b22314564e8a9a51ae33d4111d20914'
            '23c99668c0e57f88c2071dc90686e2c5a3a04580caac6122dcee22a801063670'
            'eb943da8ee34bcc61c32f235696d34ed1e50526c8e3ed016b99f7b132f9f516c'
            'f3133406da19fb7d7813ace7f98401cdcefc4583ff74735d087685c00e433d35'
            '79ecd886e6f0f26df1756365086dcfe25b76bb6957afa01948cf9652d5274ab6'
            '3f919522c17cbd37eb144dbd272122d89133fcf99fea3c8aadf39ff1e0b9e12b'
            'e8e18e7ddff5e1cd11c2c4220a9dfbc7708854e30fbedcbe0db116eff6966d6c'
            'd1d6c47b049043ad18e1f3143ace9b02cf5fed22d5bdaaaa4ff641494528b168'
            'ec97896157efec8482186530cc8272f7fe67aad1eb309d3bf592e37adf6c8acb'
            'b3e292ffe7e2811b57aa86070e1d4eafa07b4015c2eb81fd18dc3d65a0acf05d'
            'a4391008a89f3d3ac7f9788dd6c18caf39078f58a3be0f2012e7c4a38d61e179'
            '0cff4e199727921f53b189e5a1c0ddc21da13a96d0a993f1f0970caaac0345fb'
            '498c1e9efd3961bf9568f5432fb7adf3c0bf2f66e521e24ef5f5fb0747224145'
            '50ed7e5a74a6f55f79801892578e5d63f2735541c85f1800595759c0b5ad4323'
            '5577f238837f379e05bf156a8e0155c943a5dc97bf008ef746c3a8f7f0e39f19'
            '84c7b224fc9f5390779741bcf7ee1b35e1c4290a822bd233930149c0a041b565'
            'ca87f9d1ba78259c3c53266b5a984cd15cb70df4c97fde0885cd6e97cc994f3d'
            'a6b33643e0595f06ad2f75e1cf7cfbb193d3ef3f90c3da5939ab0029b5efc0aa'
            '88f70ffb8ecb2937b006585cc9a9ab3529ef15f58bd4b064a087f49213eb444f'
            '776d492a2ed29bbc9f82f2e4e9c20668a7b7b7e5f1965cad75c4fe30699451f2'
            '812496a886ee3b7f5fa1d363c64bf411dc812835749465421be73238e3b2f581'
            'b454d77b57ec7543e5c685c0acbce7c5d42b0129802e06d95beec66f1c7ea4d2'
            'e48bc91a90e4d7f9c2ab9ed71f77f3ac5f21994b0d489ef619bc94c9b80c4305'
            '3107a425b848e1cea92fe033d97085481500daa96c746ae53c1567bfd4993824'
            'e5841fb28999638365012e421608e1d35c77f9da45a62b9ad2cf011f923bdd60'
            '4bdd21a7c2da229960491a3c7a49a44507642fc05126e563194fc927b4297715')