blob: e66b587b4f6ccea2801202f3256eec0cd0333ec2 (
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
|
# 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>
# Contributor: bill-auger <bill-auger@programmer.net>
_pkgbase=icecat
pkgbase=${_pkgbase}-l10n
_pkgver_armv7h=60.7.0_gnu1
_pkgver_i686=60.7.0_gnu1
_pkgver_x86_64=78.6.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}") # FIXME: normal versioned gnuzilla releases
depends=("${_pkgbase}=${pkgver%_*}") # FIXME: icecat v78 is a pre-release built from VCS
makedepends=('unzip' 'zip')
pkgname=()
source=(region.properties
languages.${CARCH}
sha512sums.${CARCH})
# load languages list and .xpi checksums
source languages.${CARCH} # sets $_languages
source sha512sums.${CARCH} # sets $_sha512sums
# compile package names and .xpi sources
#_src_url=http://ftp.gnu.org/gnu/gnuzilla/${pkgver%_*}/langpacks # FIXME: normal releases - gnuzilla lang-packs
_src_url=https://ftp.mozilla.org/pub/firefox/releases/${pkgver%_*}esr/linux-x86_64/xpi # FIXME: pre-release - no gnuzilla lang-packs
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
_pkgname=${pkgbase}-${_locale,,}
pkgname+=(${_pkgname})
# source+=(${_src_url}/${_pkgbase}-${pkgver%_*}.${_locale}.langpack.xpi) # FIXME: normal releases - gnuzilla lang-packs
source+=(${_src_url}/${_locale}.xpi) # FIXME: pre-release - no gnuzilla lang-packs
eval "package_${_pkgname}() {
_package ${_lang}
}"
done
# compile checksums
_languages_armv7h_shasum='215312aa1489de846eefd92881b09ded48da5b3340168f65b568d191d500c646023553d699ba1f4c5ec0d59b321facfebed14a910c0bcb385f4b729ab1a3fb2a'
_languages_i686_shasum='215312aa1489de846eefd92881b09ded48da5b3340168f65b568d191d500c646023553d699ba1f4c5ec0d59b321facfebed14a910c0bcb385f4b729ab1a3fb2a'
_languages_x86_64_shasum='c259b9886024281a92fa8c834c673cf0dd34480a1ba227209872c5e923841d7f343d45885e245fe33b8ca3d24c7f2b527e6c49d6c665133781825076ee4f2cf9'
_sha512sums_armv7h_shasum='f37875c1e34337da36626de8e90921828acd347db72d6de4ccfbd000ae075ae038f1084c261a7328cd44c4aa02fd7fb68d32710c3a7b7f04ada374ad15e58492'
_sha512sums_i686_shasum='f37875c1e34337da36626de8e90921828acd347db72d6de4ccfbd000ae075ae038f1084c261a7328cd44c4aa02fd7fb68d32710c3a7b7f04ada374ad15e58492'
_sha512sums_x86_64_shasum='8bb045866d59a8ea34525c289c2a8b6fc3542cf1bc63476a3691d64af0a2e7f76a6383486a3e1464a12421cd8057aaeca1fa7477308dec1726f55a41ee58f3ab'
sha512sums=('5d35275f6ccfbbce6ee37357e91df5a4d94b79dd6e78074c3b0e8640e190b0b7c1758186818b9e0ac681ca6c6859b5c84dbe4ca3d5ebbb350fd6a0d39f25252a' # region.properties
$(eval "echo \$_languages_${CARCH}_shasum") # languages.${CARCH}
$(eval "echo \$_sha512sums_${CARCH}_shasum") # sha512sums.${CARCH}
"${_sha512sums[@]}")
# 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 # FIXME: normal releases - gnuzilla lang-packs
# rm -v icecat-${pkgver%_*}.$1.langpack.xpi # FIXME: normal releases - gnuzilla lang-packs
unzip $1.xpi -d $1 # FIXME: pre-release - no gnuzilla lang-packs
rm -v $1.xpi # FIXME: pre-release - no gnuzilla lang-packs
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"
}
|