summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n/PKGBUILD
blob: e9bd0715ae47e20a5cf7043bc194cfec0f8fc570 (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.7.0
pkgver=31.7.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'
            '0a588f96e5359cdbadb36c6364501ddcd529f32d1cb9d83f4618ddaa6b17cb59'
            '2eddc5683d6fe540745d0fff3bb3d3bc113a8af6ba262a6594ae65ab61f2b027'
            '25d634a9bdc9795f140220c65bdc418e181c91d6c86827d8f7cb083d73f880fb'
            'cee040eeb380045569cc4b1afb0aaf03c3f8347fbdfcea8d598f798441e982d7'
            '98df79c97624b4e86413dcdf096abfe935c7c9f967c1ceb383aa5c4cf89c8b40'
            '0a2a262663f589677e7300a010ce3639a3a87ce4da2179450104c41830677d58'
            '199f20f0ca0de8a5e311a9ae99902ccf2ccd07fbdfc8c119c6bd09fabfa2d449'
            '44367f7e6aab29d1fda4a7763ed08463845d34c065351215ff3798e282be44ec'
            '0232199c9a48fe86fd890d99a024d3ac915feb6cd61cde61fd44a3289e196b3a'
            'a8c45d69dd7f6c4c4f2a8513e9e0b8ed11638b0afdc56a9a2cf5f427b7c0a1f0'
            'be9455bb58210657006d15a9347534b68f0e7d2480ba24caf53f88b58a5fa926'
            '1043cf0d83ea783a8c8d3f87e98acb91ec8c2f4620f746127208150c7da5c53f'
            'f81fc577523908b1d8bf304af283f8ad655b38f0b38ca7b7666251c3359d519c'
            'a66a993033a4e4ac0fbcad5c809031824727f2efd03ac3c66eb0ff6a332eebd2'
            '9b0938950e432c74e751393d9e70645c3da740874132a70cf6066918c880dd3d'
            '47452e475a3e417f68242daa75aa93fa0d468b5d2af51afbb692205394d8c80e'
            '851b74cc6cf6eb6d28c6498c8b9784461f63ee8add633a123b56c7642c2bdc89'
            '3d14488fd8ddfd50071b9a6d3ab2086942f808747b580af40d5f9bb1cea86e26'
            'a692a4def5e7be9ea2f96d985c13206c3159d6a7629a803b5715a6b723d0dc0c'
            '8d5c311c511805a51f56286b559625edbe335fee60c14ee05e3db94f15d9b0ba'
            '5f5c9efe83fbfdd9c2b1882e7e963419d3d341503c4d755c45fca009994778e9'
            '9e3a676972e418377fb308cb358c11d08612b7dcb07d433b301006687b7b3153'
            '8e9be0c0cdfdbed64ba5fd41ad3ed993b0dc43c6e5454d2f46c6e7d0e2e0c141'
            'd78257660bb0c18f24d38de2647cef9b83c9d78d48f60e8309147c3e0a3a4b7d'
            '2e0e37655cb89c310f825f432571782d1357268240b3b3881cab2d88b749d12c'
            '622ef3b3d358bb6600a21d5c9ae9b7e1c1a358bec0d48f5ec7086ce3c0383e85'
            '84ccabbc096bbeb83128bab506dd55b4e7b857622b9acf9a487e6ac95e67565d'
            '43b6844b6479f328fa069a23145fe1e7ac05813767ab8f4f358bdce4a97b0312'
            'dac856ac845bc32257101d2265c32ca61789485c86b08e8161e614831ec739fa'
            'e0f3babd84420badf5b1f15ac8e160a0efad719bbca906521c190a20d1f5fe28'
            '5d8440ce465666fbed325c5d599d384424386f0c48fb781cfb92f6b5a295d592'
            '03e27cd844fb32722cfb740b6339b11805b7fb98c74fc9b977c994a5a6231e4a'
            '9420519f5f345a6ad592999f7ee198f82a587895c41d42e2a083be23f78ccb2e'
            '22fbf189dab6d09f20e90ae9dc6e52acceee62826e4f40d0e78f37a88a98de09'
            '893c0b3e9a1b3011d7843a747b130f347b8025712353f96123af836d8c7792aa'
            '1367c19e6615f45ae165e289bc9995fa093c7b7f60e117b6a0ba273329d99328'
            'cf6e3c348ef7811be0b2bbb6070fc18beb5c87ea4d14548f1d28d92d100859a1'
            'b190140a2217f865dfeca6689a1e07292e7e1cdeaa6ce53db824af0c313253c9'
            '1ecc3068b4c3c3dfc3f6684c763800a642090aa1dc2c137a701db245a3583516'
            '24c6e78c92f8154790013628b8a66843a1d91d87f9e178ee6af74d961a93570a'
            'a4c7cb3576f66071a81ff9ba30112bcd0d06704565a3f0c587902283a5203543'
            'ab699f9e54235fe47a7c73ea66144b79936e3fad0b93371e890165bd107287df'
            '900255ba7711c27e3b4f943f5815ecefba27633d60ea16d1b42b56288775066f'
            '6d260b12aa87f85952285e759527fc8ac798fcd1e15fc7ee8a8f652f23ef45aa'
            '0657138dac4502b6e01d9b69ed1fabf07c074bc554b3b9952165e152bcc87c27'
            'ee53b684421bdba966ac0fe7fd4d097d1d4ab69ac56141c7d4a7bce9a26ce9ac'
            '3fec45b6b571aff95be80c6853f72500b8f55dafa04cb181b9eefe77a07fcbc4'
            'd15ead65038ba290434f39fc1972158da9860ffb0e6c5a9ecc7a8848e373a039'
            '918d75b435852e83292fcc4ee4d2af4136faef18ae33ad8445d40d52fb960a2a'
            '7e07e2dd7ee40c244d9e39934ffb3ae5e15d27ea72830967cd77b1d0b2559a72'
            '105dc22914d22fe214e4345e25743c74b9cd461f41b42fcb18ff7da55e61e5f7'
            '1946d9d3b02a8f2ad500e9f9f07d5e1b82fdf17ff771885dfc31aedbbaa7ef02'
            'ccddc9884034f561fee704df75de4ef7d76ef29bba326a01edcc9bf6bccf042d'
            'dcf14be2028707940d86df4d770de06ca2ed8201c5b4b187fa09d6f78a98dc7c'
            '3ae449cee56d8feb49a14923b8105034674cb561b45c68d2ae38743f393fe9f5'
            '7ae80f5b4d0b842f8a6154ad1e7099ae564fe048f6d3d20daac3f9e5e1afc801'
            'f6321b77111e1069fbf7d2a5fd0d253f72ffe0867fa9514403665a413760f26f'
            '663301e08ecd37e995a036b19676f06cb8bc4884b70b21069938bd57b7f11624'
            'fdb2c9faa56ef585924aa23091c6ee088688b5ae12d65bce2d161b74c149013b'
            '49d2ecfedf7e348dedd6401b274f9ea3efda67a3446a43c7ea8061dabc0087ca'
            'b132b38b05fdc60ae79f617cf47358c217ea20dd58504ceed020deef0f24fd34'
            '58f6c903d13328c805f89174a8efff3b7679c1bbdf7c2db948154062844fcd05'
            'c07c8928437a19939ddcde5e3658fdeb3691ca9eed5cdd888fa7ca92285decd5'
            'f0a2b177bf234e718ee7ae83b3bd9152011b71486c366ddbdc556693aa0eb41a')