summaryrefslogtreecommitdiff
path: root/libre/iceape-l10n/PKGBUILD
blob: a2508cee0b8f41dd4c96859715a526e060ef3ce5 (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: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>

epoch=1
_pkgbase=iceape
pkgbase=$_pkgbase-l10n
pkgver=2.48
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 (American)"'
  'es-AR  "Spanish (Argentina)"'
  'es-ES  "Spanish (Spain)"'
  'fr     "French"'
  'hu     "Hungarian"'
  'it     "Italian"'
  'ja     "Japanese"'
  'lt     "Lithuanian"'
  '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 Debian Iceape."
  replaces=(iceape-i18n-${1,,})
  conflicts=(iceape-i18n-${1,,})
  provides=(iceape-i18n-${1,,})

  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'
            'a8b955affee247a1c541bcca68fa383444fcf5db37659da045f47c0f6451d351'
            '66cf0338e5607582824dffbd71dd6d82954275501de50bca3ebe70a2462c2b8a'
            '835dbdca2c0d40be3e76045ec04932f0fff8223030febf7533885b9ff9868067'
            '3f499d126578dc72c2982ac7bb6a47797dc6a520624b0eccaaf313f3de659330'
            '78680bec36912e021ab35f144bd51c726dc9ce8031dbf7012bf9f2ef685872f4'
            '37702e2d54e965c6dffbd5c0c7bde9e4494ddfa9fc984136c826974a9fd253e5'
            'f7a7c207878bfc84e9dd53f7111f00b7c297ad9c75c594ef4df4ddac532179a2'
            '2f1138ca9a9d1321dbe38d24cc0b6994a4a1569eb2bd4baebbcec00ed0e5355e'
            'f0084a1ce0681a1e3038597c6a77a2f3436b91166263f50b325a86cf9c708716'
            'fb3029513e8fcf9713b5ad565e66ee6842d59822af509336e56b713373fce6bd'
            '54ccbd5b07e8260462ec060135f969a10dd94569238958fd96bde55e0cf61056'
            'a2de7dcc53b7d0db496a8f1efab774fa603b4635a200fcf00cb503ebebb3227d'
            '4083874a25597b833d4b9473f05bdac1f7de92d5f095793597a9fc855cb160b0'
            '2c22ee0372cebea03737f6b506a0aaf002e67be9ed26662f70204250964dc642'
            '0ee69e3b81708004bb7c155b68343a80d15c60735a603207a86939ff7b033060'
            'cc176898ef9cb67728f0ed3eae24336cf52582bf0144a894f3fa04fc71140861'
            '831a4b42faa31f4006984269e2d6d3472a0f1450f92895fb8190c1719e2ff2c8'
            '991629043056dd722202116ef026aeb86a8615539aabf41a28b6a78da63eab7b'
            'bb41ee50948baca9e78ae1ba0174046bde21d7bb823c6b365e32d7a8c6a9c50f')