summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/PKGBUILD
blob: 1b95a473db028695eb4f4f510b6bbbb09035be0d (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.4.0
pkgver=31.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"'
  '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'
            'b758c51e79fa7713a6f147d928eec15892f044d2f295ff0ec48f5a76820f812c'
            '6376fa259325eeafd71e148fedcf19cf9e3a620fe805e78089a3d68af4a4caef'
            'ac3f330a687ad8cb329a46844e92439dfb069b29369fdec93885c74a6137a35e'
            '5c1bc813f0f2e5440d6a7f6bbe0cb346de688d47cd241b68834bf398ee35908c'
            'aafaff2a6dad2220a1e75b8948da60c9eba68f81130fbded5c34e773f4fc46d9'
            '867200206ee9d6339a2bbfce71f7d3bceca32a0821d5fd4d5ed03585b8f98cdd'
            '36481e5c6f1c138ca7752cfa4085c4ba9e4bf6ed32c52f6bbf72c105ea59c08c'
            '391fe8f7f56270ef3f3e23c4855387053155134d4b2718a40e2a96a8432dec4c'
            'bc46fdba7cb03e1d83fc471b54cfe4bc6734a72871b6f286c66fc63c26142764'
            '060e5bc3c4995ce1d44d8d463d47af785748a3ade78160e4a9c54ad4c6ce982b'
            'bef0bdf34e89eb0bb36ea53456d479beff39e3a2fa19cc96a3f082ada84dcc0c'
            'bd6815c2cb86ac06cf171d956c28bf29eef10405058c3fba5a7cc34dd90171d7'
            'c659b3c533e040d1c99d4f0f69dec4a995dc8c437271bcecfae53de4dd6181a1'
            'cce52ecb2aede4639c4606c860f50abdb90cde00b761319887bad1ecf541f48b'
            '7dcd156460118af201d721b0a48366546cce7ad9f3406371930492fc18b19677'
            '9338e5f57be7b9cb7d594c8177c67a5d27a38d9fd9632c4d2b52276cd3b17170'
            'b00c7af0eba2f57014a69d3b7aff4de21c8a4ce51897d19bfb6d0127a85c6a3e'
            '5de0e63d0373ba13e944c7d097b413b02e32cdb36a33e66b3280a82f97e1969c'
            '056086aea4ae18784038f01f4911ee540b6140978894ed4e6bb29aac669a6917'
            'af9a03bc3f80465eca10e23ed77a2df331483493bb461b64792e06a6dd57da29'
            '0c36c28fe519fa379cfcc75a8382268c1ef037509d90b9c7018e5317a8067a96'
            '0a49f061bd5a908cd6aa40bd7157d8622ecafc1b2039461702a1947ae07b6a23'
            '136711c07702118c67aff6e1ced3036acc85fdfd34810d1b31d7beda6e05d7d9'
            '193c08a611dc42594b544146a060598108a6b810caed7b8f6e4c610ef88f6f63'
            'a35b6b8095950c830a14f507a74a0efece50726d9ba7a2d0fc7d14b53150a8b7'
            '31b103b899684391b48c4b7284474efd96b39fd6612ed5b607fa283b05ec1f61'
            '44d9e4471a2cfd9938ddf7e617184228d448f9aba94a2eaba88b34650474cf28'
            '91f7bd26d3939fbf4ce4398215b4a74a252e663217201fc5c606e5f24e28cc79'
            'cabb75f91fa2d4592dbf94526bddf2549be1f552d0f943ccfc5a540fc8f5ebaa'
            '688327a8dca03496a2114645ebe9ba43c0b709b0d448a17d76369a8e8fb09373'
            'ba7c5ea060cb8efab96b159516b09aa04d026ace91e80b8eef504280b1ad2bed'
            '175928cdec2ad62bdf97a365020bd688f692a4f57e6d9417aa69c9cc67f1a302'
            '93655d1035276a89c68425d14879dcadc6eb1e566bf934f9e9589eaec788d15b'
            '2d63b4eb3baf322b12526b6a465f165e0fc946c9f86cd973168572f384f35453'
            '6bb744c813d8656642845538d2f93d874877ad1d231c699aa16b44452e57bbe5'
            '6091e8dd488e704456e8318ee01eb566e738ea9c6a346e5351c590b65c9a35ae'
            'af33455b4ef8d579595d4e312ae9d53920f49f90a2b436bd0ffb225938e50536'
            '7128b31c1293ef7d314aa91334c83846149e0584dac24cb2702c1d4455142b81'
            'a2a1711be09d3c9c856bfe7ee4cdeb278fc3509e03c2b71990f179ad083dafe6'
            'd529f227ad665ffd62b00b12d8740b9ac60fcdb22156a1cdfaeac4a1d16d6221'
            'dbc36dc2dca453e9db62dcf98696df1d5fd3f567bf61b9ac8d82e7655655e0e4'
            '97a115649c8d2bdb7440bf1ba382def1e72b9e03e7e379311cbcf0b3281a7fcc'
            '4e5067b258ff6f881f2570a0575bd87e3aba780cfd680576419d32a126278a49'
            '79bbf1f26ef7ce4e9e6b3a6d548d851ef5c4b36157207a21b70d609857a4d7bc'
            '9b042399be1fdf1d327aaf400a49ef269b39a6afb359e78b79b21473d8d2e5ba'
            'f3db7ef61fa94c1a5a941bc85bd1dbfe87a76b0227225c6a4c9e9857b25dba35'
            'e0eef93742c9b9a6c511300733998de104a1c63666fe5d5ab485d872eec381f8'
            'b5c85dafe1aa73f14c2831670a7766955c0893d74f3e45e5c447e8b007515c11'
            '715426ca25f8f7a6fbf0976743cb5c572f1e6b53d1df1ca5ee71a102f172f0ad'
            'bf294f9942ca6495b6f4196b0955c956792b5651628f9374ad34fc655e91ba5f'
            'f408ef749ea4a160605961abc37f03322affce56e09ccdb0c824f6de2926ff10'
            'f7be658507adaaed67fd9bd1a6482a2b49ffc975e991934aad7e319e3f21c843'
            '30a49028ea0d54edeb9a06a7d7dcf7e58e6e77ba36ff93353358c7eb23df7f66'
            '84a96831d8d781c1641e40ddab8bc1b2ab134c8c695b7de739d6dce51cbba583'
            '48ea0c4b0f391a90d887283437c23b2bfc0af6f0b9efb85e72444a0931f905a5')