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

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

_languages=(
  'be     "Belarusian"'
  'ca     "Catalan"'
  'cs     "Czech"'
  'de     "German"'
  'en-GB  "English (British)"'
  'es-AR  "Spanish (Argentina)"'
  'es-ES  "Spanish (Spain)"'
  'fi     "Finnish"'
  'fr     "French"'
  'gl     "Galician"'
  '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"'
  'tr     "Turkish"'
  'uk     "Ukrainian"'
  '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'
            '257bd56c3db3d62600e8fcb4e621df1cb3cede2e73354a0f588516152598e9b8'
            '06d423fc182c0d6b674572a94c0628febbe314883dc0be7f481583ae21ce9485'
            'b2485aaed83ad46edb565fd6d35b785fc350ae96a7c32df91eb028807d8f442e'
            '8d72d02bcec01e63a6b4630bcfd092fa1dcdf21b8424f4de878d4460e6ba1865'
            'b19890d7c446ffd98a9c94f95986cbbed9842f4149ce549d3463128957f1ed9f'
            '096bfcbd124463398d1776955587036f7d8d969582053d8980dde18e34e21738'
            '8d95036953298f880de663961a4b686bed9b233dfdc247a5107465d97d671b68'
            'fbbca3abdc2fca3a7d18500e606ef75e3ee4ecbaefce3fc6bec211422521ac0e'
            'faed1301c6f7eebf6999521feb7a8161f4ec5c6dab01ae717f9bb7df360a6382'
            '36d8a69aa1a526dd8ecc6a2fe2da55b5b4d3e4bcbbd2d13af0f76fa79ae21fc4'
            'b259e45414ea7247c586605797064743efd203ad22ef4a6ca734d9d39ea0ddcd'
            '6818ac8634aa959c049791bd96e228ee68fb4af214d73b2ded67cdf9e8fba159'
            '73c868aad2fdcc3ddf3cbb84bdca2ec7e43c7fcf0ac1d5ec243717123dcaf353'
            'eb99109e0b25415e460c31fe6be35d41ada6040ca91bb90fb29af951f0b21b6a'
            '2762bcddb6b4d36b2d14bb961e6b3604420e099216d5efc60b8835bc2709251d'
            'fa6f780f2fec5b43c75bc46778ddcfa983c989fe16a0c1995c0bc65a375188f9'
            '96d1eaf1bafce2a4b11abfc7b3cccc3409b073e7353416ec7eaec48f61d0ed83'
            '1ef665be4063a864564ac13d6cf87892bc5c3c57a9e4115efd03403382e14b8b'
            '68f6ca318be2cd1f78245db311ac9c0e0ae877697c0e310284615b352338a61e'
            'af8c126fe02cb3a8b9783c4a1f8d4bdec8b684195a2a8b5be537df88e2ec2861'
            'fc970bfc8b52119c147d564076904df9b3722fb922bc9703709ceb5be2bd6144'
            'c5dce74507307008127e3402e0c9a877f333f2b1085b1c912c77969f4a433632'
            '9932ca0ac00312a9fd9bab3199f7e55564beb6f5f339647c7a6c0cdd4cd82241'
            '28f634be2ed10526dbf6bf310b28f4da921d5809bce8216418c34ad07ac75443'
            'eaec998d922789be13cfc42660ab96abd0b1ec47cb4394b8a9f725969141ba89')