summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n/PKGBUILD
blob: eb1b6d2247bb5bcfde7833bf561ca91a03fed7ff (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.6.0
pkgver=31.6.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'
            'f80c07e92305aafe0f085505df07ae46318f4363c9d76b090ed40eea5c54f38f'
            'b8149fd38889772cc8f04f3149a97adf12412b773008c229d5e8449bef62cabe'
            '21566b8c9433e61ac5aa748a4787e7fa1916a12c968bedafdb6f58d5b38f02a3'
            '67227989b98240f64697319e24ab52a59f8dd5c7af187d697e2b603ad851e2e3'
            '1c88a80302dd6b41c6d0bd51bd6c1142df26de74d6c5df5573ff46c133a82b7a'
            'f53892ae36daf81d18da6f791e197bd7c0547ffc2a17fafaac9f74495bc44139'
            '29ba39989415f08aab6de4e2bcbb1b0363ad6f843901cabde6dd65f999ffbf97'
            '28c1487892186e2acf3d5b4b376638348959ddaad9c20dd76340f04754ef858d'
            '4c8d39ebd28ddb91296f3747d1eaec785d263014e8f8fa5cdb4ca110f647ede8'
            '6acea2ac4f5f57ed5bd27cc32cda83a8895b06bb9b3bcdbf31abd989aab90e5d'
            '2acf451edecbd1a71e67f8284ace9686939b1753cc620ddbc568e4e5f9f8beb8'
            'f17fdc689df4dcf45fb09154362b8c91d0ccc98a2d6315cf436ec3f7f8d2c382'
            '421a93d33f40d3b06463648765173b2abd2d52e92dac4a220127ec3f6fc2791a'
            'cf080d9070a39b111d44683e2604aa515fddb1872070d3e7cd0703369877ff20'
            '0c20743a3b5646df78cb310aea61af6055a7b26435d03b872aa09511032430eb'
            'b96193a4559d36d260c7cda69f77b85b81c82063d33b7b6aefcde7e81a354c44'
            '2321f1811b996e792fcd3d6939edf663d109facd23d0204d3b79d969426d3ec6'
            '79a345a7cbf84d966090c3c1085b7c614110d4df521e2ac740d123b7b462cf51'
            'aecdcee115c26b662c332935b83f2d238e6697e1f364c70e664a2279974d36de'
            '76f750944d4abb03c91def4633ca1acf241b47f10c578bd3c854c50e2e8d5064'
            '1ae15432fe697ef6e3203232866d19eb30c0d0eceeb9d7ad0b3da7a13173fd6d'
            'aa41db60db95fc5215f287d34dd6d0442e6bc9487c31b2dc02068e2aaf13cd2a'
            'd899a2ab230df96cb86bcde4f4cd4d5618f1db3ef2f95339d30529cf88bcbe6e'
            '8916bc2a16a8745eea5e87f9078800981066fcf542de9ef5964329357531d32b'
            'd81dbde9b543e5e82fbfb0bb8a288509e5fb79e8b60c863c3e2881b0b43c26ba'
            'e70f79e87affb88d5c0f7803370808e48075ea568b09e294128ac5a90287a2ce'
            'c03d189e50745f3060457f9e5f6a8f79e97fb6150e0e1e7c95d4baea2e0577e7'
            'b97f9f6626feeaa60e6607aacbc5b3010d2c6ce5e1a0f0a0948cb94d30bfe02d'
            '07b03eae4b711da56fc188853ecf5fbc77b25c1fddbb4313014c2dc1921839b8'
            '26e57eba8436a2c76492a65b1d22c7d8ee1e2c04058188737e5efb2818995bf0'
            'd89850b8208977040f1d591807839330988b9c69cf6bf1f49e74550cbf4189a7'
            'f4b4c7d7e217819f05451e51a234d245c6c7a4307abdb788409ea220f81ff5e4'
            'ccbaff391e61505e373cb255c676aa4adb42a8dc4d5de9ad496c2e08ded160a6'
            '5dc5077cadcd1b50e15b8f2b2a3135a59a5402e7409f9ac1a2d207478eac351a'
            'e68ba57ba3c7f2c49997ec15f83cd2ba3e40681007eaa9c31e8baa19feff76d2'
            '883a926229938dfd165dd77689d9c144d830088bf3fee780770adb554a62273f'
            'f658a51c916e864967d797cc69f99b557754f8d3cf80375f5a9a4511c6b74ede'
            '3c51528a9a83724eeedbf8baed573908b0c4b920f3c79ce5cc89e01cf4862b7f'
            '3ca6d636113f8c9b5cde634ead70d68a1426f145889345c3f2a9517e641be995'
            'f4f90e0485ad08223dd1303adc1e28eacd81d430f514ef8985e32fbe1d161281'
            '87a83ce26d03046d11bc0e655cd2bc24e23f7d96f8f9ec9b7ce32757bef0cc91'
            '227288f798aadaef434cf41550ad38def39173452cd5c12138133bd31c3b1b4e'
            'deb76d2ad24931bca49607288a643c4922c1a4994bd38d8cfb2e6b12070e3110'
            '470229c26e78f695e45f9e14b12641e404a52b27c8a6361a4b8cbd6043e24ed9'
            'ec72cf970d6fadcce53abfd6d2a4294f9d95cb7d1c2091cc88d6d6ad246ed083'
            'ce4b8ecebaffb660f74232a82955c653a6746c1129b28d18aa69cba00861a242'
            'd9a161ed6c6176076a5503fb81ac646d2882a3ffbd1d3c5c7c007394423b20d6'
            '047f619c882247db7f7858a6a934a9f856da34c0eb4dad0485b728fa44db8903'
            'af3a9cadf9c692393f91b60b1ccc0c5be37a849301f8bd1ce3db82cabc3f90b2'
            'e0029146a674ff951f838519051187ca4eb6e5fcbffabe4c4e5a0014b6d0bb0b'
            '94f46f159bc0691662f784f5f6da8181c67b3960e11fcfb323bd79719162d5a0'
            '449fceac2238e7f8a2bd0a582e71303e5616b0ca6f0677517a4ccdd79326259a'
            '31cf4386a39e0131e51fd4d8f314cd2b03f94fdcfbdbbcbd428cecd0ebe623a1'
            'acfba105617d3c5da9d566374f7df88ed1763ac80a9062a23094323f023569ce'
            'af0b016ef706efa92ffe3dbaa04c61a74662008361129eac161b5f8b1576e155'
            '3e9ca41048612e5f574710106b85e637ae2ce20d611973e60964cefd0d1e4a6c'
            'd4abda4a4914beac1f2e3023dca0bcbc33380e3c0b032d47d40731732b384984'
            'c22890414a63f3711223967340b08e76a6ba6c7e93233b9ccffce8d2769820d8'
            '4267901c68fb0f5c694a12c22c99ac3127e91d129ed3f477f8dfb80f6a77dd49'
            'fc60409e28df7bacb9a247a1af2d6def38c4407304028e720653fa040b98b37e'
            'd29abc4a5c8907e26038442485b92209c7dbccae6e1adf1087ce15d203ed3f7b'
            '7db8609c2392ab93167494af4b417bdb28c6b13c25c691438297c8c9c9186b88'
            '00683c1605f603aa238a7de3c4008f128f55dc577aa6851456f51da56101ccc8'
            'f3d7128be978fd88520651527dfd8b27de7a04a7ed0b838fe925bf1bb049b7cd')