summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: a726179f810528778c49c723c98bc5f8ba18ed4f (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
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>

epoch=1
_pkgbase=icedove
pkgbase=$_pkgbase-l10n
_pkgver=31.2.0
pkgver=31.2.0.deb1
pkgrel=2
pkgdesc="Language pack for Debian ${_pkgbase^}."
arch=('any')
url="http://packages.debian.org/sid/icedove"
license=('MPL' 'GPL')
depends=("$_pkgbase=$epoch:$pkgver")
makedepends=('unzip' 'zip')

_languages=(
  'ar     "Arabic"'
  'ast    "Asturian"'
  'be     "Belarusian"'
  'bg     "Bulgarian"'
  'bn-BD  "Bengali (Bangladesh)"'
  'br     "Breton"'
  'ca     "Catalan"'
  'cs     "Czech"'
  'da     "Danish"'
  'de     "German"'
  'el     "Greek"'
  'en-GB  "English (British)"'
  'en-US  "English (US)"'
  'es-AR  "Spanish (Argentina)"'
  'es-ES  "Spanish (Spain)"'
  'et     "Estonian"'
  'eu     "Basque"'
  'fi     "Finnish"'
  'fr     "French"'
  'fy-NL  "Frisian"'
  'ga-IE  "Irish"'
  'gd     "Gaelic (Scotland)"'
  'gl     "Galician"'
  'he     "Hebrew"'
  'hr     "Croatian"'
  'hu     "Hungarian"'
  'hy-AM  "Armenian"'
  'id     "Indonesian"'
  'is     "Icelandic"'
  'it     "Italian"'
  'ja     "Japanese"'
  'ko     "Korean"'
  'lt     "Lithuanian"'
  'nb-NO  "Norwegian (Bokmål)"'
  'nl     "Dutch"'
  'nn-NO  "Norwegian (Nynorsk)"'
  '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"'
  'sq     "Albanian"'
  'sr     "Serbian"'
  'sv-SE  "Swedish"'
  'ta-LK  "Tamil (Sri Lanka)"'
  'tr     "Turkish"'
  'uk     "Ukrainian"'
  'vi     "Vietnamese"'
  'zh-CN  "Chinese (Simplified)"'
  'zh-TW  "Chinese (Traditional)"'
)

pkgname=()
source=('brand.dtd' 'brand.properties')
_url=https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$_pkgver/linux-i686/xpi

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

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

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

_package() {
  pkgdesc="$2 language pack for Debian Icedove."
  replaces=(thunderbird-i18n-${1,,} icedove-l18n-${1,,})
  conflicts=(thunderbird-i18n-${1,,} icedove-l18n-${1,,})
  provides=(thunderbird-i18n-${1,,})

  unzip icedove-l10n-$_pkgver-$1.xpi -d $1
  rm -v icedove-l10n-$_pkgver-$1.xpi
  install -vDm644 $srcdir/brand.dtd $1/chrome/$1/locale/$1/branding
  install -vDm644 $srcdir/brand.properties $1/chrome/$1/locale/$1/branding
  rm -rv $1/chrome/{.mkdir.done,$1/locale/$1/global-platform/{mac,win}}
  sed -i -e 's/thunderbird/icedove/' $1/install.rdf
  cd $1
  zip -r langpack-$1@icedove.mozilla.org.xpi .
  mv -v langpack-$1@icedove.mozilla.org.xpi $srcdir
  cd ..
  rm -rv $1

  install -vDm644 langpack-$1@icedove.mozilla.org.xpi \
    "$pkgdir/usr/lib/icedove/extensions/langpack-$1@icedove.mozilla.org.xpi"
}

md5sums=('d5b2567a8cc8f64591f313a6efdaaffc'
         'f3719964e893c1002b7a923e8f95f923'
         'b5e3a5cfdedb6e4a7f5f9ea3072d211d'
         '66df04ba03303219d08f937cb06fe938'
         '3804681332783bdf3563d81d68a665ba'
         '5f96104ac35eacf28d4c57ff6bf98c14'
         '35a5fbfa596bf955b5003378ce0f2df3'
         '32ea877ad2292b63dffbf0fae8431683'
         '1b83051eaa3dab4aaa87d44647277319'
         '1e2128acc06d356980d68e449764dc67'
         '9bf5d4c1ec4ad263fc8541a7be27e207'
         '9adc822f0a67d40fe480c083cae6602e'
         '9e4905a8c323e0175f6a4f47e6dd5e1f'
         '51fc8abb81c7e37759a5d1908c0533e7'
         'c52fda3aaaf8d360c9c61b0036934d04'
         '7330154eebfc43b83a4b23b92d00894a'
         '2d16a2f626219e4c54db579da6e1e9eb'
         '6d419663f2da1fa7d6b8024092539981'
         '460f399e494c440c85cf4230aaa6254d'
         '724aee657af956d15a73a7722af10ff0'
         '9ad09ab2640ba1fd331a1374391c4a02'
         'fb2b6f5c32a9ce44750fde8a86a48671'
         '4fe9aef590b395d0cc8cae6c7dc558bc'
         '3b9cbc5b92264e90dd2f04cc03402679'
         'e13d90095e358c5909701b7aeef1497e'
         '252bfcc8763f3442c2daee65843a1cfc'
         '6715149e466256cfda9c18ac3ec6d202'
         'a45038c65477ea6f162bbffbfaa0c386'
         'cbc16e082b226528e1ce8ff931bc1abf'
         '23653450ee7aa589ed562ca179ee233f'
         'cf7d27b738aad88cf42eb6f140004184'
         'bd27b9d56a1484c7ba8882010c268e54'
         'b6cd3c1a783d4ef1da5789d2a6be2679'
         '679c8ba09e5dec963573464ecfe9ae98'
         '197b27196463f296d903ffb64a1e8c35'
         '1f07ce9f20ed9dbfc8f02135d7769750'
         '86ea9b404bbbf9450e1d48ffe4185add'
         '97904a6943047181652ab4b1fa3e304a'
         '64b9a6d012dfa00e4c22f782e5fbf924'
         '87ea13f53caf9cd518a5709dbe4a77b4'
         'b7f50b7825eac3181b39afaaed86597a'
         '7978f1089d96f8fca6f8b4e171dcebc9'
         '0406c8dbbac735a101cfc214fe562541'
         '2684786b5dc33005e741267f5d5c93ca'
         'a255cfb9ad520c750258cbe8ea52d853'
         'd94523d8d7a705b430af6384bbf739df'
         '59d47b1c2015890d69893af4609ecfec'
         '50c382d2ed81ae85403d967b034e590f'
         'cffc4ffc01f832d4d5258ce610b3aea6'
         'ee9b11818741185e0655826aa21cde28'
         'c42f5ba22f9ae4a926c078b6b4135ac2'
         '8cb2a37bb97238bac7414a7607e6a5e2'
         '50080dd3cec4e1750d94fb999c54bed1'
         '218438476b98b19f994ef9205c3bd3fa'
         'b779dacd0eeabba4f73c68c115d9846c'
         '393588c7c3b38b05a7b3343713c60e08'
         'a79161e42f2531306883e97277177750')