summaryrefslogtreecommitdiff
path: root/mozilla-testing/icecat-i18n
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-12-29 15:39:56 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-12-29 15:39:56 -0500
commit8b9dc14ffc0413ccb5887f7f9502c095ca7e7a57 (patch)
tree3e0edf69cf90605a39c74a723075b853afcb6746 /mozilla-testing/icecat-i18n
parent0c14c3dd36e1c2f529ffa248383a275cfb21f168 (diff)
downloadabslibre-8b9dc14ffc0413ccb5887f7f9502c095ca7e7a57.tar.gz
abslibre-8b9dc14ffc0413ccb5887f7f9502c095ca7e7a57.tar.bz2
abslibre-8b9dc14ffc0413ccb5887f7f9502c095ca7e7a57.zip
change the ice{cat,weasel}-i18n update systems to use autoconf-style PKGBUILD.in files (more robust)
Diffstat (limited to 'mozilla-testing/icecat-i18n')
-rw-r--r--mozilla-testing/icecat-i18n/Makefile19
-rw-r--r--mozilla-testing/icecat-i18n/PKGBUILD5
-rw-r--r--mozilla-testing/icecat-i18n/PKGBUILD.in46
3 files changed, 61 insertions, 9 deletions
diff --git a/mozilla-testing/icecat-i18n/Makefile b/mozilla-testing/icecat-i18n/Makefile
index 5dd818e62..237edb616 100644
--- a/mozilla-testing/icecat-i18n/Makefile
+++ b/mozilla-testing/icecat-i18n/Makefile
@@ -7,25 +7,30 @@
# - sed
# - wget
+# Variables:
+_pkgver=9.0
pkgver=9.0.1
+pkgrel=2
+
+# Guts: ##############################################################
default: PHONY all
all: PHONY PKGBUILD
-.PRECIOUS: PKGBUILD
index.html: Makefile
rm -f $@
wget http://gnuzilla.gnu.org/download/langpacks/${pkgver}/
langpacks.txt: index.html Makefile
egrep -o '[^>".]+\.xpi' $< | sort -u | sed 's/\.xpi//' > $@
-PKGBUILD: langpacks.txt Makefile
+PKGBUILD: PKGBUILD.in langpacks.txt Makefile
sed \
- -e 's/^pkgver=.*/pkgver=$(pkgver)/' \
- -e "s/_langpacks=.*/_langpacks=(`xargs echo < $<`)/" \
+ -e 's/@_PKGVER@/$(_pkgver)/' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(`xargs echo < langpacks.txt`)/" \
-e '/md5sums/,$$d' \
- $@ > $@.$$$$ && \
- makepkg -g >> $@.$$$$ && \
- mv $@.$$$$ $@
+ PKGBUILD.in > $@
+ makepkg -dg >> $@
clean: PHONY
rm -f index.html langpacks.txt *.xpi
diff --git a/mozilla-testing/icecat-i18n/PKGBUILD b/mozilla-testing/icecat-i18n/PKGBUILD
index 117d6a6bf..62f06df8e 100644
--- a/mozilla-testing/icecat-i18n/PKGBUILD
+++ b/mozilla-testing/icecat-i18n/PKGBUILD
@@ -3,7 +3,8 @@
# Based on firefox-i18n package
# When updating to a newer upstream release:
-# - Edit pkgver= in Makefile.
+# - Edit variables in in Makefile.
+# - (optionally) edit PKGBUILD.in
# - Run 'make'. It will take care of everything else for you.
_langpacks=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW zu)
@@ -14,7 +15,7 @@ pkgname=($(for lang in ${_langpacks[@]}
done))
_pkgver=9.0
pkgver=9.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Language packs for GNUzilla IceCat."
arch=('any')
license=('MPL')
diff --git a/mozilla-testing/icecat-i18n/PKGBUILD.in b/mozilla-testing/icecat-i18n/PKGBUILD.in
new file mode 100644
index 000000000..90c901e31
--- /dev/null
+++ b/mozilla-testing/icecat-i18n/PKGBUILD.in
@@ -0,0 +1,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
+