summaryrefslogtreecommitdiff
path: root/mozilla-testing/icecat-i18n/PKGBUILD.in
blob: 90c901e3138293365e095a5dda658b9b79e32810 (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>
# Based on firefox-i18n package

# When updating to a newer upstream release:
# - Edit variables in in Makefile.
# - (optionally) edit PKGBUILD.in
# - Run 'make'. It will take care of everything else for you.

_langpacks=@LANGPACKS@

pkgbase='icecat-i18n'
pkgname=($(for lang in ${_langpacks[@]}
        do echo icecat-i18n-$lang | tr A-Z a-z
        done))
_pkgver=@_PKGVER@
pkgver=@PKGVER@
pkgrel=@PKGREL@
pkgdesc="Language packs for GNUzilla IceCat."
arch=('any')
license=('MPL')
url="http://www.gnu.org/software/gnuzilla/"
depends=("icecat=${pkgver}")
source=($(for lang in ${_langpacks[@]}
        do echo http://gnuzilla.gnu.org/download/langpacks/$pkgver/$lang.xpi
        done))
noextract=($(for lang in ${_langpacks[@]}
        do echo $lang.xpi
        done))

build() {
  cd "${srcdir}"
}

_path="/usr/lib/icecat-$_pkgver/extensions/"

for lang in ${_langpacks[@]}
do
    eval "
package_icecat-i18n-$(echo $lang | tr A-Z a-z) () {
  install -Dm644 '$srcdir/$lang.xpi' \"\${pkgdir}\"'${_path}langpack-$lang@firefox.mozilla.org.xpi'
}
"
done