summaryrefslogtreecommitdiff
path: root/libre/iceape-l10n/PKGBUILD
blob: 942f5f7bbbfc90ba267e4252aa977975e3919b5c (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
# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: André Silva <emulatorman@hyperbola.info>

_pkgbase=iceape
pkgbase=${_pkgbase}-l10n
epoch=1
pkgver=2.49.4
pkgrel=1
pkgdesc="Language pack for ${_pkgbase^}."
arch=(any)
url="https://wiki.parabola.nu/$_pkgbase"
license=(MPL GPL)
depends=("$_pkgbase=$epoch:$pkgver")
makedepends=('unzip' 'zip')

_languages=(
  'cs     "Czech"'
  'de     "German"'
  'en-GB  "English (British)"'
  'en-US  "English (US)"'
  'es-AR  "Spanish (Argentina)"'
  'es-ES  "Spanish (Spain)"'
  'fr     "French"'
  'hu     "Hungarian"'
  'it     "Italian"'
  'ja     "Japanese"'
  'lt     "Lithuanian"'
  'nb-NO  "Norwegian (Bokmål)"'
  'nl     "Dutch"'
  'pl     "Polish"'
  'pt-PT  "Portuguese (Portugal)"'
  'ru     "Russian"'
  'sk     "Slovak"'
  'sv-SE  "Swedish"'
  'zh-CN  "Chinese (Simplified)"'
  'zh-TW  "Chinese (Traditional)"'
)

pkgname=()
source=('brand.dtd' 'brand.properties' 'communicator-region.properties' 'editor-region.properties' 'messenger-region.properties' 'navigator-region.properties')
_url=https://ftp.mozilla.org/pub/seamonkey/releases/$pkgver/langpack

for _lang in "${_languages[@]}"; do
  _locale=${_lang%% *}
  _pkgname=$pkgbase-${_locale,,}

  pkgname+=($_pkgname)
  source+=("$pkgbase-$pkgver-$_locale.xpi::$_url/seamonkey-$pkgver.$_locale.langpack.xpi")
  eval "package_$_pkgname() {
    _package $_lang
  }"
done

# Don't extract anything
noextract=(${source[@]%%::*})

_package() {
  pkgdesc="$2 language pack for ${_pkgbase^}."

  unzip iceape-l10n-$pkgver-$1.xpi -d $1
  rm -v iceape-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/navigator-region.properties $1/chrome/$1/locale/$1/navigator-region/region.properties
  install -vDm644 $srcdir/messenger-region.properties $1/chrome/$1/locale/$1/messenger-region/region.properties
  install -vDm644 $srcdir/communicator-region.properties $1/chrome/$1/locale/$1/communicator-region/region.properties
  install -vDm644 $srcdir/editor-region.properties $1/chrome/$1/locale/$1/editor-region/region.properties
  sed -i -e 's/seamonkey/iceape/' $1/install.rdf
  rm -rv $1/chrome/$1/locale/$1/global-platform/{mac,win}

  cd $1
  zip -r langpack-$1@iceape.mozilla.org.xpi .
  mv -v langpack-$1@iceape.mozilla.org.xpi $srcdir
  cd ..
  rm -rv $1

  install -vDm644 langpack-$1@iceape.mozilla.org.xpi \
    "$pkgdir/usr/lib/iceape-$pkgver/extensions/langpack-$1@iceape.mozilla.org.xpi"
}

sha256sums=('21473f12638f447e573ce26d02297f9d966f61e04c5fcbb7fc30919a26a6c94b'
            'c01f71da0ed60a9a1e31325ca79ad3bf629496d42adb1871de756faa658db420'
            'd49655d6c7e6bbc16158d77a075f54b15b5740a6fe0cf9c6ea08df72ca44bcad'
            '41d8ae62c7af6b5e7168ba26a0b32e34e41a0357ed6e83a2097307c9b2e10afc'
            'dc8c43b153d063e099a50399b07069c4e00550f2826ad59d0eb14f6247801c03'
            '2118452fa650182eae694100711634021b7b1b574e285bd2f94902a9aa8533c2'
            'f3a809d7cae48953e88c2d86c679cab129fee4234bcfc56e44685b2f022139a7'
            'a735b0a4ed2c22436ef315ab2125ed1305666f19b505807f5ead4c96160966d2'
            '500a063b22c313ae6458ff895aa6307209e16cf388facd8605efaf9828bc350f'
            '12d7c6c806ba11985cad8c487bab973672b29ab22df830284918069978aa4781'
            '861df4bb14dc00891a221ce08e2be4ed0103d680fe9b676f710d6cd965c3d121'
            'ad2900b48a72a84b1d45f240e722f033159bcf232bd25ed606dcbd4d16518369'
            'ed09b8d293567b776e0373a3d7bef2d389725dfd885a816470ebe3a522930119'
            '93ca899651a38c8b0753b419bb2d0c321e6293fb1d6ecc7a10129793b3de4cff'
            '625892c53126ca77164b6a278d20e23c0e20e492060fd6d18b5c0e093912416e'
            '4bc8a587938668123541abd630f8b0bf0851e00674e6f779da5f0fe6c1e29d5c'
            '3d2e50c71a1a415cb1be63b239bde489da2d6a32fcae0bf78e03144c461a31b2'
            '3d1cbb0299224a45d0ef08b8603c1a54a49ad98f5600fc6d9c4bcf2edda87a52'
            '6ad7d931aff6717fb5592d1eb58c1e8adf29b01ae5669bb49beab7c1293d9d5b'
            'd2ede4bc5984894868f510e2ca7af0fd6d40259aa9a9b13ed31d27e983c5cba3'
            '7d0fca908224b971a7f31aefb0d4446eb2675ed13a91fb2ee21561b37e394117'
            '51c8ddb22a4ee432317dac617e78937789a62bc960d64b7b154797707ce518bc'
            '2ee8ee5e418fbb08297f249e99c8628ef08d458692c63f2eb07eca770e928ea8'
            '372ff6a75492815897d50fa3db8e503639855a950f62cfbd04d785d8a9cba69b'
            '32fed44e5416e6dc5575fedc42e939cc9314a4a2972305f9863ba55daff77b97'
            'efaf381144c82c3f0d05882b2f760e7fa63327b16acbb0849186593c971ab5f3')