summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: b2a89bb284374b0ee587ad39e3f18ad35d37cae0 (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.6.0
pkgver=31.6.0.deb1
pkgrel=1
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"
}

sha256sums=('49b419449431d8d64e20427a2e7105e3ac1ffc41e677a5f9a8eb276f5b82df4a'
            'acc2cf95661be7cb8928fca89e08d0681685409ff2428e4e3d25baf1af427b38'
            '469ba3e8822685b1b16131da5c50dd3b7372cc92a932f61569d9734daaea2eac'
            '26bccf23d234e2ecef00733909bb432969c72cb74527adecc2ae59022b43ca97'
            '95540e5f60de453d2281951beb7df8bd78ca91bc88437fcbbc6bb16844d31b90'
            'd7e08d395b768f1de63ced97518f8dbf6a747273264fae3d241cc0ae17a3e867'
            '2e69e0b9d95a4018d658cf831dcfd7c8897534ce078d492a96a215dee9bb940c'
            '4b7d3ef6c5df11058772483fe7945c3691e2cd8e8236963f4d19b23b4bb1f329'
            '735bf46013112a854b3f283714bb0847c475cc068e63c6a3485f1631feae27bf'
            '23619105a28386b9cd927f65fd59223a1378fc09134b00864cd21d119c762857'
            '117129fbc2fdd5e6572942b600b1049189a7fd91852011c5c92c44bf042362a3'
            '2d181ce84bf62a45118941f52e70a5987c610356dca4df48e0e88fc95b45da37'
            '90608f577f5ef31c9003b6e2ea937dbf0435f3c06aa1eba561bbf8309568c90c'
            'fde93bbf9ff06e121870bf496418bc1703e0a2d0c5f27bcc3d130d2304921f67'
            '11e68ba7462dc8df41a43a1e4c04f6865c8f46e96295abfd6366559204c89cd9'
            'b600ba8e2543eedc1833f6b936a70f25b9553dbc6835879d65dc14749e6db4fb'
            '9017824378160bfe10d41bb2decbbc5a60a4db9199bff614c2b63cf40b3d310d'
            'd81f38f094ad0b962bc8fa6e11b57031748f3ca52c0ae0e335d704210e1f63f0'
            'a4f47a340b5623317756cd861705e96aba343a3175bc738bfdc72634859deed2'
            '3a66f399789c0375d5e908a23ab306fb64eab8a4c35588112b0c83e027635987'
            '38f52c3ae85908354964f816f3e83b12c26899b3112cd3de6d7c2672a35e86dc'
            '0deaef241661c4fb34b159528297b7a922a5bacc103fd62e6d5fa73cb129a2d3'
            '628c3682e167f87b50aed76ac02fe5e069015fb850eabdc79bfe41d0d2b239e0'
            '41cd7af4039f99ba71d30c61764c2b5079c5b23aa6d8bbeb1d7eb5ba76d9915a'
            '80788599aba0058d055e14c6931adfc5c3fcafdab2b3f82c765e82ba85cd6618'
            'f2b3dc16e00792dcb23da705428ac694510df99a2365eb92587d814015f91c33'
            'e866fdc131fdb5e384aa3905f41bea5498941a6cbfa73af9c933e3368869c30b'
            '975596a745b826d545ab70c000663a3464b22edefb23e97a128d1d8f3c1c3020'
            '99288ff622c443eb2701c5cc041705ecbb02afd99d59276c0aea04147f955335'
            '746d6a546528e49a5f66a88704a9adfb2d6605dd1148de42ec1ce8427190176d'
            '68ba2fd9b48b844d5d3470986ed344917a8021794fe67108c626e5945a2a1e7f'
            '48adc76231ef558458a23d91c1055e22b3100412499344cb2f5f17ebbed96c88'
            '282169e68a88f96299feaf19cf8c779817c29fa0f9e381691b912988562e3009'
            'f42996017694aa23dfa6d785f165461347cbefc1841ba841d403cc9a7e6cd9cd'
            '71d61ba20fb60f7f57e0cc3633f6e4cdbff36fd5a55392646db97d162bd452f2'
            '7a135a00b3106249147d5d023e17710266c9f32b0e55496d59387571164db82d'
            'ae50880cfada890136723afd10f7e4ff6edb958bc8cce8c34c9298d8e34d20d3'
            '1b6b140130026c86e2f9aacc10fa6e642cee186c67c2a23b350e9bfea3ac828e'
            'b4da0cd42307642492a73ef30e652394927530471b1d71897ce6fc28c53f25d9'
            'ad3e92b8ec4caae1d2228e33e4c55ab46f7ece5eefb5ead17ff76c092fc75be3'
            '1a67a4855350a6e13ffcd15da4a546bd830bc4cdb6cc69e75f769c04415c9e45'
            'b3a9c93f19297092f77c3018ccff6b863c333fc60edcbfd7baa503d290cbb091'
            '3e511b47615ff491d99d524cdfea9aaf97ec6d2fa44080b32a512a7c8a9a54b9'
            'fbe0f58f8ad2bce7d9a589cdff6bd4f25661aaf8ee3984ea0ecb1390b21a89ff'
            '0faa4cea2a9b11329f337c583f9660afd3b243560e6c46709b141192f1957b02'
            '2314272354b7eee77ad7ac35c76efcf4d72951062f9ec55ddce0fcb4ae69a6c6'
            '0597c8b782f7c5386e926a27798e7f35a39d623e8c3056b1e9a7ce2849268541'
            '2f49d57813524da0e686587dc2a442eaec1ba90b53cab4294a99833ba62d8aed'
            'b2df645d03d2b103760a8372792183ad7202c96cbbcd00334ebf15c0532576d8'
            '95a3053e4749dd6236e4aa9d23f0fac65151cfb494103c550ac79b644c3a14db'
            'aac574c17163d1ba286677c696d654e667afe9d7eee48b89cf0cfdca86ccb03c'
            '9134c27513ee9f4eb51a7b343624e73ba0e74f00372b3fe0dc31f317843da181'
            '4f82c2e827b5b5955e476cd92ea5ee3e6ded7b7d608dede7fadb04423704249a'
            '2b53c55a0301cf5d5fa64473d1dc97706fef163d96d2af013a90b950fc4be0fd'
            '9ff8daa9ee8fcbae042c582e8038505775c0bff64f02d5d482ad275928e3af3b'
            'b2a613f62cb45b4c136cc402e7e54f1737358c63466944d4753b47e7b212e84e'
            'a424e49bb2fa28e4d87e94714d3076cd756760316a5499ae5e7d0cf3e7d50efc')