blob: 193899a20272f833d2cca6d68b35d76e3a35e6b5 (
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
|
# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Luke Shumaker <lukeshu@parabola.nu>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>
_pkgbase=icecat
pkgbase=${_pkgbase}-l10n
_pkgver_armv7h=60.7.0_gnu1
_pkgver_i686=60.7.0_gnu1
_pkgver_x86_64=78.4.0_gnu1
_pkgrel_armv7h=1
_pkgrel_i686=1
_pkgrel_x86_64=1
eval "pkgver=\$_pkgver_${CARCH}" # this is actually an 'any' package
eval "pkgrel=\$_pkgrel_${CARCH}" # but our different arches do not always roll at the same speed
pkgdesc="Language pack for GNU IceCat."
arch=('armv7h' 'i686' 'x86_64')
url="http://www.gnu.org/software/gnuzilla/"
license=('MPL' 'GPL')
depends=("$_pkgbase=$pkgver")
makedepends=('unzip' 'zip')
_src_url=http://ftp.gnu.org/gnu/gnuzilla/${pkgver%_*}/langpacks
pkgname=()
source=('region.properties'
languages.${CARCH}
sha512sums.${CARCH})
_languages_x86_64_shasum="c259b9886024281a92fa8c834c673cf0dd34480a1ba227209872c5e923841d7f343d45885e245fe33b8ca3d24c7f2b527e6c49d6c665133781825076ee4f2cf9"
_languages_i686_shasum="215312aa1489de846eefd92881b09ded48da5b3340168f65b568d191d500c646023553d699ba1f4c5ec0d59b321facfebed14a910c0bcb385f4b729ab1a3fb2a"
_languages_armv7h_shasum="215312aa1489de846eefd92881b09ded48da5b3340168f65b568d191d500c646023553d699ba1f4c5ec0d59b321facfebed14a910c0bcb385f4b729ab1a3fb2a"
_languages_list_shasum="_languages_${CARCH}_shasum"
_sha512sums_x86_64_shasum="776c748a73aea3766a0b4b69b0768bfaf6ad5294b7bb916497fe767c5b2c5ecd065f9e6793c7f6ee97287180664231332e980784a96efa47dd93f8a2f838093a"
_sha512sums_i686_shasum="f37875c1e34337da36626de8e90921828acd347db72d6de4ccfbd000ae075ae038f1084c261a7328cd44c4aa02fd7fb68d32710c3a7b7f04ada374ad15e58492"
_sha512sums_armv7h_shasum="f37875c1e34337da36626de8e90921828acd347db72d6de4ccfbd000ae075ae038f1084c261a7328cd44c4aa02fd7fb68d32710c3a7b7f04ada374ad15e58492"
_sha512sums_list_shasum="_sha512sums_${CARCH}_shasum"
# parse locales and package names from language list files
source languages.${CARCH} # sets $_languages
source sha512sums.${CARCH} # sets $_sha512sums
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
_pkgname=$pkgbase-${_locale,,}
pkgname+=($_pkgname)
source+=("$_src_url/$_pkgbase-${pkgver%_*}.$_locale.langpack.xpi")
eval "package_$_pkgname() {
_package $_lang
}"
done
# Don't extract anything
noextract=(${source[@]%%::*})
_package() {
pkgdesc="$2 for GNU IceCat."
replaces=(icecat-i18n-${1,,})
conflicts=(icecat-i18n-${1,,})
unzip icecat-${pkgver%_*}.$1.langpack.xpi -d $1
rm -v icecat-${pkgver%_*}.$1.langpack.xpi
install -vDm644 $srcdir/region.properties $1/browser/chrome/$1/locale/browser-region
rm -rv $1/chrome/$1/locale/$1/global-platform/{mac,win}
cd $1
zip -r langpack-$1@icecat.mozilla.org.xpi .
mv -v langpack-$1@icecat.mozilla.org.xpi $srcdir
cd ..
rm -rv $1
install -vDm644 langpack-$1@icecat.mozilla.org.xpi \
"$pkgdir/usr/lib/icecat/browser/extensions/langpack-$1@icecat.mozilla.org.xpi"
}
sha512sums=('5d35275f6ccfbbce6ee37357e91df5a4d94b79dd6e78074c3b0e8640e190b0b7c1758186818b9e0ac681ca6c6859b5c84dbe4ca3d5ebbb350fd6a0d39f25252a'
"${!_languages_list_shasum}"
"${!_sha512sums_list_shasum}"
"${_sha512sums[@]}")
|