summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: d63b6cd83b5f406a7bca5c484736136f207037ed (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.5.0
pkgver=31.5.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'
            '80b83ce312ed5616edc61b34604d4991ed1e2179f067336d019b64e32a929530'
            '5e04389beb3b7a8fe8d910e52d6683104db2a937746c7db829d6e4ff6c8bab9d'
            'a7db2f7a89632a0e55b650dc08b957bc678445db5fb807b029cc7f330651ff28'
            '1ea991edf2e89421e1f6de27538610be53c61190fc24d62ae181677e904d25dd'
            'e0e1249d2a82c5a52f9b11dc5b4c64dd3204c07feacd431db6fcb31678604f93'
            'e62d04221c7352c833da0df59a44ea13aa9bb30654a8d745760b0e1a3f42689a'
            'b3bff4b5595a3427c4ef31ba27fcfef64839bcbddf37b62d2f04f35c31e3889a'
            'cb84334c881ba9444553b334c6cd6e6541c71bd432c8bff46014603a70e10ec2'
            '284e99c29e42d02c79638c9483aa0b8cc008b46a53da11865f8da33506c46b6b'
            'a55c0d175e08ce74aa94b9f703c89079aa64996e605a34d061dd775fb8d3fea5'
            '46870a4296ad1f1c1871034bbd3afa21f345f32c2970960ffff0f836d847cd69'
            'c92104ae4cd34fb8f545d4c3a5a39bc3caea50d4729d3689859b84a49b187c06'
            '51564b06ba20565fbe98dfe1047c914c55fcb6f621f9f6fdbfd76d4167a4ebe5'
            'ef962dfff8cc1f77506e1ac9f852cd314eaf11e017e0a46a8f4ea4de53f9bf21'
            '6dd729d5d718a6b4c5d542b37e3876e3523fdf21953224c9eb39eb9efd5f4b1d'
            '43d89ed6ca9df9e0d008193ff9e40cc95bd95831d64e163f72a81c2efdfa7ad5'
            'a7c6a4c165ad6f2d1f175527d5f875554fa399a6d6889236ffed493077bbc6e0'
            'b35caace844de02426c23f9e87b8f9651215d80d95f45bb13a2f5002d612204d'
            '4712f3ed3edbbc4b14f4dd50e1402be4cb8dfcdd965c67f8d3186c391702e0ae'
            'bba975b7a3783432d46017fa650cffdff40b2c28229db24f1f4b5d0a73fc0a77'
            'b115d881b42e94c6c2357e884c9b943574830ff150a75435a5e80130adc77304'
            '9943a52c4c3843b1422f9deb566f04357bbba5a7f60c8ce587a6b46f177ac508'
            '5e2564106632fa6c978345c59f87c93034061f1d2d8ad3f2558214b6056a37de'
            '1a6fc4ead76564ecd40dbafe42da5c0cf9ae487160db5da24a45d5cafa86afb1'
            'd9758d7f3866155c29237fce8a59a5ab25ef7372f52a4abf802cdc68e9aa0735'
            '95bbeadbfe9eef336ab446272029ec6ee909f590cffd84299b4d7ea8cd215408'
            '6f4157eb89931bf75f080791e456c45833ca81f12550bb1c93804be561e309f1'
            '6e5015d1eb222a70e7aa9f0bca08eec99b81172a216fbba068450e02da681c17'
            'ef04dd0a3fe1c0e4edc39a447f561cffb6b962f3dc610ffcd0946c1d26904845'
            '17a0b2c5a2cb1421ec0e73a21040fc18a961ba662508db10a9df19b8476a83ac'
            '4bb4ce66c270912d005227395c1959579d8bb8f4f8297f3078b3f0d25bcfa0d3'
            '7a38503c3a9b8e5400dea6627728ded00a0557ae334e1107384559c42e1dec08'
            '2417df06915b561cc020d2819a7025db605e5af46ccc1c143fa4d05ccade392b'
            'a79569621cb322351152f4dea1607c9b37f50348a14114f9e61007ecae32288b'
            '011833942de32f1ddc54c5af9737267c88fd8f540c15cac117b495e056092c10'
            'cc40effe5cdf84001f7128eb8490e4341dfb896c341bab7487acbfcef38c3747'
            '5b5b5fd4429225671a02c6bd81441574013969eb09c82270ba84c6f196a82a03'
            'f9929f9e7f59e58af8423b66a06577814740c1d25cad445132bbbce00f75ec0a'
            '9f3d7078b8e8266583042eb9329f9ac0253a6aa0478b8f61ab40e11414c4d2e1'
            '6c77ef803b065be17f2089879d1bacf0e1fd12097ad55748da7d5cd870e2cd70'
            'ad39f5df1f8038b80e575173f6e97cff72a926f41b974d008011f4b285f88730'
            '7964ab86199c2b7d16d025eb4080db630ee9d7221c7637470d1f774279b69c85'
            '6a75dea1bc33c492e8ec8b6a6dd783d2ca908f0f94d47474ddd96fd6b6116865'
            '4295a6f35fef93bd1c1b4b07d315ed45f92109c56e2cd1bfabb98b42b7d0e68b'
            'b91dd4281edb18f64412c7b459df5afebb12acc5de89c0af26c5a453603d9a36'
            'aec21bd6f7f183dc7446ed24dda5c64ae7362c48f6d32ef3169cfc273ba4c45f'
            '40658e0261e2eea88c2561435a721b221634d6d7b50293bec162f5db24ae6fde'
            '3e9bd7a41b45a165518bfa773b96ccf56f8f6420d54164e51f3af44e3264ee0e'
            '34806febfad1cb915b7489d43e6ec10273aba1458d922b03d38995669f85283f'
            'd9ecbfde0508d1fe70a541f30edebea6d60f952b3f102c65c235ac9ed2274a28'
            '165d89d6c12fc99f2de8f83c4ea39f4866b2b65ded899598fd072b909c9aee22'
            '8841b2b381fdd345cd0b19fc2feead78028d5cc118fda6ffb52539b7e6f7c8b3'
            '0b4049bbb4ac58833d3ae35750ece29c4893554afcb9622afbe1d64345e6378e'
            '38a92f434e1d70abd474be1fa449bbb0c19ccad91ef440a5d8e8803e98bda5d3'
            'c81b39d164cc196e99ae0526c124647ea6de6574b415e0dcd8299f76c8240c84')