summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: f9b0e73cf1b101f48720d7cff01dea07249ae70b (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=45.2.0
pkgver=45.2.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/$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'
            'a978e30fff1f2da8f420f512a3956a7381fbafcc1fbb9692cdcdeb9277259739'
            '396c5eda1408bd303d848be10f836603f325166097741857a6eff27d10dfa5d5'
            'daf2f8099263ba47043284431abfffb9621be3f73fbc66be4d392e233cabb166'
            '118c047b82bbc37f249447d9f5a77d994b2d01e60347ad63241940e9944aaa3a'
            'ea259b4d5ebeab67d9791aab7f6da8f3d88bb97f679c805f4517a981816d08d7'
            '899f9afb7fcd889dc4da068d3a35feb6d4a84928124505830e6d5cd4f66c1eef'
            'b066d9d80a17244f03b996158fa16b8fcf9049a1b922249d2bf09823ea3deaa4'
            'be80f75b6db1e345c79f61aebf918127754d8aad943219dc2631e5eb82a9ae4e'
            '0f5db3def36ae7e0fa829c3fad44e11c1363bda38ae779efdf38cd6ee563dbd6'
            '7a62a915897cf2ce2c0c45a2cc683f8df2770bad0aa818eef9e8bd2fcd031566'
            '9e1ec973a715740a857c3aae15fe8bfcd01209d80d64d2cafc6ad086dd0ed2d2'
            '2bf37620b68eb21911fecba483463bf6a3066c16a4db0fdd9496c9bf680c1f76'
            '9ba451a5b06685f43387f56304745dfb5ccd0d946b5b7e2571fe7490328fa761'
            'aa5c3e259439988ae44ff97ba743c044cd5ef731350b07fe90e430b4e9e7b326'
            '478da2fe644b6bc8c982c29cdec48183c38fc6898dabfe6afe5607effd843185'
            '53206d90dde7e7eb7e43b6eafe0c01c5b0f38bd36ba82987fe182846da676ce2'
            'b0d650684043e9ea4aa480b32303dcf457830611e6ec0d60471f71d6a74d206e'
            '15b674575aa8aa5019ccdcb0c851ddc40c4e0359147efbf750f05e2fef9c93a3'
            'cf1689340d3443fcdbf8bb2a81257f7c7acde63509d59fd516d78c0b9585da74'
            '3ef09752756290132951a80261ba93d1160bffeeb30392f3e348ac7a843a6b6b'
            '8a0ed16318f1f15e52e31042f5af8c368afd2479d685e8be31b78f3f7d5ad232'
            'd6dc477d2f567a966c5a5c96164265da5804e352f3a3df63c869953634385c7e'
            'a3f80339ef6e980fd45dd0877357497ffba73b05e04e0911e1dd2ba5f626e65e'
            'c48487d6fca86519b3b773fb37044bef7387505c45c37b2f302eabce8201d1ed'
            '496153b62e38876d23d4f7b5da826be8d158ee7a7e5294025202c1944c0ad667'
            'ca89bc13f9126abe02c9a72191ea59667aaa9c0ba90c0618c6b3f152687707a7'
            '013a5e1146f1126e839aff7cdba5b96bfc03a7faece0b60ce68a780ba32ef4f5'
            '99b232001e2bfa81a938d23fa6142660055aba5ad126b6e1e161389a948dcbd8'
            '607362dd26f7d530589dc02ca78441eaeafe6a78ae356967d8f87c23087d3c84'
            'c57aff249ba9a5974c0a25f99eff35c9d6b9e6e01596059068003416681477ad'
            '785c4ba30e8b3d41b4b7989febcf03fa6f89c5d6024e12df6860e52ef5fd1de2'
            '427f2f3b8676d925fa0ff5b59515da6f67b222bcc7c0e9039063283425433e83'
            'c8cde3092ea42720f9824fe9fb0fefe2a354ebab846b430ce14a020d2d1f2ce0'
            '0a2927586939524e1b3ebb5d63cbba6c4124c0fcf7de034e184e6509522bcee4'
            '20c3e0bcae68cee6c00b788763ccf17dc9bf4d69667fd8ad635f13035aa85699'
            'f8f6a6ea5d6719acd9fefaef9286083a9322b87e9926298896972716956a4c85'
            '3360d3d7f0c3a04e595a9de3cff3fbfffed3889bd09b1d3eae7e663d12fa0c35'
            '1c8e9ebb0b08ad58588dce9043dca6c5fe22420836e8d810863cd35e78e0c677'
            '5a6e2c6d762241d986e7e9e07487b8b228951c7ae5343fa90a95333b18b352dc'
            'cc2083bd72177ea77ce84e82477a70a07d69442260a8c2d9b922385ce0eb475d'
            'e93ed1f99303670926ee40da34987204382806cfa5a738bc7964084b0f40ccb0'
            'd8115c3268771c3b1465bc230d13aa5da97f598c3e292a6234f7509732bef448'
            '9bdaf161f7dcbacaddb3c00f6a44bfed5e30d61f738343e413613507fb1a7575'
            '34d759713de25905ef526d9f0e615339d0c79c42a1f7bcddd5cb87c59f32cc09'
            'da26f4d97f0df751f032e14f057504d4bd6d640e1d0b0add9eaf15243d7debea'
            '5a20ab55ad711289126c40c322cf520f93c91e490db3bddced1784d1504403d9'
            '56bb13177f104227caf0a2b11e96b997e466f0d1e3d932e4858d79b86aeb92ab'
            'f43fe29427604817ff0fe912232a513b04560f1ff4438a3dea3ac82d0943379a'
            '5275f45f8e621681d65ce85c0582ac49056af43130eee5a47f81210096875a9b'
            'c3c71505de44e585323fa927afeb8c93f5c90cfdee744f5e44768a3eafa8d872'
            '0675a05d99555f8ea8e9d77b351d5f8a9c694362d8a421663ad9cb4c7257dcdd'
            'cbd64d87bb674279e5e241542359138399f77608e7f23f1a73f7e08d2e000bd1'
            '3365a20f6a97745f6550b1be5710fd1fdac8d6277ab63ebf5c16909e397e140b'
            'ab2bbf3016773dfa422604e89562c41d30df8beff34b5b9c9602ed00aad6774c'
            '29701e0f882973ca8f4a6028608b27be3350883e55040cdc46355dbce4c2dd01'
            '760db86b7c8f851ba3416b50f0a5a44655629f9c4f9c1ef4282fc3c1c9e71778'
            '0a876c51d52eefc894102dcc1d9c867d33122672e76e0393941f3af13fcaf1bd'
            '14aa68a367c79a9f87788c304966d3a60e99a77a2c42db9ce05d5755cc67b93e')