summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: 3c33553d92ac9bae0dd7c8e377294bdef88ea8b0 (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.3.0
pkgver=31.3.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"
}

md5sums=('d5b2567a8cc8f64591f313a6efdaaffc'
         'f3719964e893c1002b7a923e8f95f923'
         'e78bb229494ebae812ca208b04cbb2be'
         'a6a14c32b48e5248570caee0c60e3c16'
         'e758c3fdf7d4768b6c1de6e6e8203d7b'
         'cebf02c51fa047a6c605244241b0b44d'
         '81a5d3452b102aa57ba0298a5de1fc74'
         '1a77e7908b61f40a867924af679b14cf'
         'cf45e10b6f6fa92b742cdd8738419c48'
         'ae201f47ed30d326400ef6b88c20277a'
         'f4c18982c67c246d0e2d80e452c9da62'
         '0780682cde007f37351374acd1e71015'
         '14a73ab091ea68a7ed5306783410fb4b'
         '4057d98d1e80d98436a71d3614985de7'
         '84a1097239c441824e6b1605b7e5a42e'
         '8c27ea0d6e6537cdc5218b5d849b4651'
         '4e2f96be8e5ba0fbd9a7ea88977f17c7'
         'f7accd76437f72c92d07b7bff2ef1c30'
         'd5fc8d1790546085f06298e75533329f'
         '358da8ccdb0fd549ee9b4418646f6dbb'
         '463d6767cd4404f0cea5f876a6d45f02'
         '5e8f5da9c97b00a9a0d38ee34b44e78e'
         'ab73c67fae04f5d661a3a865caf7b31a'
         '8cf623eab1ac08a7da8f42b3b23487fa'
         'ee46fbdd2b8d9e9ac511be884c72ec9d'
         '8b409035101e216b107c1f473356e8ec'
         'a7e614b031d9b4d9ddd0e66d3aa16496'
         '8a6fee8ce46d908445db6b6cdef32f2f'
         'a832001298791dc6229bb7d043ca4cf6'
         'e10065525b42e9cbd1be4cd843a91cfd'
         '0d36373e2b65a67c7c9d783096a33b1a'
         '18d23c87bc69bd0b428101a58140b908'
         '2c5f18d944dc342a5de8621b5f51e604'
         'c49752089df3837f8fd358efcdf5df48'
         '81a681775c3d622c2a3d6d0eabd14ae1'
         '1b68cc310447550ce8d90551165ef1b3'
         'f9399fa8f6bc1e33b7451f3760512fc6'
         '9c737c9fce3b77f2a89a74d00c712571'
         '6020bbc11acd0df2b90d6f1f9285f192'
         '22a40a831cd8366fd91c9ea41eac899c'
         '068ec8fbd917396aa6714c12aa315986'
         '80d493a2f3cb45a98164a6733c52707b'
         '748810f4a6c0cb9a2e2785ce93cf283e'
         'b20c5160770ac5e30385592d135a5fd2'
         'f18562658846d50d379f4789ea96c9c3'
         '6b474086bd7748d82c9d5cbf6a5844db'
         '7cc79c5a8336b1b7c67caf629a4ea63c'
         '2bb4f44b077ef635927c03a48a558e96'
         'b615aaa3b27e9975f169f9e25cf8522d'
         '92449e8867a027b987e1fd2e853f1e10'
         'e5ac45c9d1dd555936e4331d63acd5c6'
         'c7e9dabe7baa1e73344cdef87b599022'
         'f8b20afdb2ae547ef79793b29fc70385'
         'c2cb46955175e5ff6ff60032d1a698fa'
         'd029731b829814d9f1bc7c7b72ef8e90'
         '03ac876f0c1195fc31c0d87b74068910'
         'd63669360a5ee66f8f120cad7cd0c5d2')