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

epoch=1
_pkgbase=icedove
pkgbase=$_pkgbase-l10n
_pkgver=38.4.0
pkgver=38.4.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"'
  'cy     "Welsh"'
  'da     "Danish"'
  'de     "German"'
  'dsb    "Lower Sorbian"'
  '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"'
  'hsb    "Upper Sorbian"'
  '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' 'region.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
  install -vDm644 $srcdir/region.properties $1/chrome/$1/locale/$1/messenger-region
  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'
            'e6edcc7c478d73ca5a17e4889acd302d55201ec5c29de545d3f44165201923db'
            'd4e60e78da33e68a2d9d6c38fbc21da120774f071d1ad66c8f64e45e7a1ab1bc'
            '951fe8891f21179b800f540871c0845d29b33d1edaddf2b731e8359fd02b7d18'
            '19da5332ba7beab567335fb53da020f00e37bc210b06606427c3da9663650569'
            '81d7df7cf1e66d16801ce727c8142897e2f9a3ef78d6fcf84318f1d5bdced1c5'
            '444efce23211bb069b7528ae09e89129225a89fed49077d1cbfa4eb2c0a1d356'
            '9ed680b42abce45726df6b45586789a4d5ff069a658e7266368503c0eb2e9b3f'
            '4203b358f6d9fe362f47a777ed131397de49e0fd3e4956ffe05284fac3bdd6a8'
            '5a2c41694f56c2804c9f1c0a46262f02e318a146bcd4c6a9c6c32a6569a6e729'
            '8aa599c3755cc40532cd0cde0ffd2d7ecb5d04cb05d92a068859fd4c772c2c74'
            '50e972efc741054a60a242963a357cb1330c91f1ce00226b948592135b0bd40a'
            'd65ea03a6f4a252b7533952c0dd970e9f202e15ab6cdc70300cb2c43158d00e8'
            'f19d2474f9bce0b63e6ee46da8566ba5dd35b1e295eeae5fab44db363319640c'
            'dbc7a3c20f5f5a8f9d8117a9de9bdea1bed8ec86761a56b607b54d8e838c95dc'
            '2a4b9996555f2aae4d146f138d91fb6d2033d4d92f9a406ee174f30eab4e79df'
            'ef8a6ec4aa464854e6c42a6926b3fbda2df4e668ec1bb223ddfc9f41b3c92e2d'
            '7bd6def638093ff0e680728da782b07ce2e95276fbdeadba6e372cce31bb7cc4'
            '331b344422ff462cd96674e3162682db8b02e35078533e72a0f70d00ee8b6911'
            '3c38b229f6401e7d1d654f70da5bee4f21288c2b77c33e6e49f181ecf11c6661'
            'bda4a1a17667f48d3982dd9b67993a8aa46054a1e31798686f5495e808b63d08'
            '641a0ddd879d8964469caa3aaf590c26f147830c02245086c6b50f4a2097a201'
            '80dfd39499fc518b1682d4e02bdec7f31d2543a9da8a6588fa29e08ff1defec7'
            'b08acf69e3811748d16633f57a2796135edcbc172baad4b760657afa2cc4f969'
            '1b22df1635e8284dfe8b0211b962f4e6dc1b6821c5be55bd86d3ab5fb32297af'
            'd5df704f78a895e996d3c247ea9e09afe60f007963bb2f38db19ab31ea00b132'
            '77553c630648c6c497a2ae839c981aca14d09cca5d788bc1598ea8af31f45772'
            'e3b410c7c3a72d7a00a941d707c4c3b0c60d42bc30866a6c93665a18998e0e1c'
            'd91376b2fcc6940ee0d0681d3926356ea2b7dff8d1083ea34c8584a305276644'
            'c258583b8d4830ea20bcaaa0f6b3f1d3fabd9b3fa4aa5725f3640f48240cd282'
            'b73805280c9464e8d41e74ebbf6a2b2fbc58fb221fd17885e1b6fd2cd225d343'
            '3c8f349176d421e090a16034d4208375fd36f2ca0db664b9138f344f6eaaafb7'
            '294595cd419da412e8a907d9ec0b5934acbd8163cbfebf29d3472b5a6ca8fbee'
            '1c838ac49cf9c8cf64b1233abd685e996c284babee9a64964b4b90c6e2285105'
            '0c572cadf9b5a16696b78f2d1683b627db0a5702698f7477d367ee2690aeee69'
            '901b396f920d4dc88367b2828c945de1ecc4e0b1ed2f33d793e65a07dad8f054'
            '6f2f92f94c228c9da48a7c36c8b14868a029d9a2c3f54d5352740722aafc0da9'
            'c6fc41ca583092e314f19c3814cabbd275072b104a860f7644af00c5e9029c7a'
            '0c5614dd8c5ee6ef20dc5b57eadf496abc66361c9b0128bb172a314939557c56'
            'f0441f68a754a411b447f7b6423dd608de5716a64a5d486bb5275ddd0632c456'
            '036789fff634d37159f7ba35d43e93f65d8299934c55aa4b76a217b3dabd0186'
            '29acab11415d7ac3229cfcc17538f1f93c9dfbdfdfc32fe8dde9a621dac70111'
            '63aa21e0cc3c3171b19a1196deeeb9a9179b2261dcc9517f491d911be69ef355'
            '97d632fcb86a8cd3d5d62a57bc6d0a4d06ecf37439e47397ea4f9016b056cd7f'
            '525147d8c2380a33fb32af4026972b0e814203c8f23c01104db371479c390d93'
            '24659e293dbecd52684bdb434bd4f3f21333459c67d311499451ad9787d97b9a'
            'ca87bfc055d76231dca985b0a270633d5b4c092d09ad63a23ed7b87ab98f76ef'
            'ca82a950a4cab1c303b531c47017e8e753381a1ca35e229011e624b3659615b4'
            '9da32d2866ace3b5edb129a8a43f0b91e492fbf62c390671f8b88b87e245a618'
            'e9ab86a2c6d3dd032929f198a82b14ba7823ab973b85ed2dab146057aef99629'
            '822208506a476e4df2629566861afec9fc739b49616aef1217f080cc2da195df'
            '2c20c2c288b8ab06b268ea1a055f61a2c7287cc7eaa342271a4511c6dd6a4052'
            '16f914f1cc1015ea798d3486b08aaa8c8b7de19a0bbee85631f2d910895758f7'
            '5d5f37c0104a08e0101e93b28a2ad5a3df8910e3c47cce4b25f4d61d1ef699f3'
            '171851b7e75b8e7bf227bc15079b8608a9e63682d26057104452a3a697772cc5'
            '6d40b110a752fea21018d18430fdc95d7217e77f9a0cc912c14c882218c5e1bc'
            '9cdc9926384d425473fc5c62d2bb35c20b248326cf98b73b2c98f7144f2a2061'
            '4b385a97569a40331a5434762af52c4561f045892f0c51e852aae3af748df87a'
            'a30ec5320021565cc1602623a4e83017dc31e3dcb1ac83afaf68089ab2c2d321'
            '4e8687e4862fbf46e0e3b45f3c691fcef649d468f8a14163a4945e9909e06d30')