summaryrefslogtreecommitdiff
path: root/mozilla-testing/iceweasel-i18n/PKGBUILD.in
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2011-12-31 23:02:48 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2011-12-31 23:02:48 +0100
commit6018f318724745ea2800c629d0db77f19ecbd02b (patch)
tree6c57a138047bb35ac0753554f4ea855d56f9e333 /mozilla-testing/iceweasel-i18n/PKGBUILD.in
parent4f85ee8cc53396a283d492bb29ee2d0696c0b821 (diff)
parent007fa4a3de674cd44c9b4609d8567facc307de51 (diff)
downloadabslibre-6018f318724745ea2800c629d0db77f19ecbd02b.tar.gz
abslibre-6018f318724745ea2800c629d0db77f19ecbd02b.tar.bz2
abslibre-6018f318724745ea2800c629d0db77f19ecbd02b.zip
Merge branch 'master' of git+ssh://parabola-git/abslibre
Diffstat (limited to 'mozilla-testing/iceweasel-i18n/PKGBUILD.in')
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD.in63
1 files changed, 63 insertions, 0 deletions
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD.in b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
new file mode 100644
index 000000000..691c80c0e
--- /dev/null
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
@@ -0,0 +1,63 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: fauno <fauno@kiwwwi.com.ar>
+# Contributor: Figue <ffigue@gmail.com>
+# Based on icecat-i18n package, which is in turn based on firefox-i18n
+
+# 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.
+
+_debname=@DEBNAME@
+_debver=@DEBVER@
+_debrel=@DEBREL@
+_debrepo=@DEBREPO@
+debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
+
+_langpacks=@LANGPACKS@
+
+pkgbase=iceweasel-i18n
+pkgname=($(for lang in ${_langpacks[@]}
+ do echo $pkgbase-$lang | tr A-Z a-z
+ done))
+_pkgver=@PKGVER@
+pkgver=${_debver}.${_debrel}
+pkgrel=@PKGREL@
+
+pkgdesc="Language packs for Debian Iceweasel."
+arch=('any')
+url="http://www.geticeweasel.org/"
+license=('MPL')
+depends=("iceweasel=${_pkgver}")
+source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.gz"
+ "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.diff.gz"
+ "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc")
+noextract=($(for lang in ${_langpacks[@]}
+ do echo $lang.xpi
+ done))
+
+dpkg-source() {
+ # This will simulate dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
+ cd "${_debname}-${_debver}"
+ patch -p1 -i "${srcdir}/${_debname}_${_debver}-${_debrel}.diff"
+ cd ..
+}
+
+build() {
+ cd "${srcdir}"
+ dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
+}
+
+_path="/usr/lib/iceweasel-${_pkgver}/extensions"
+
+# CUT HERE <-- Separates package_*() functions from everything else.
+
+for lang in ${_langpacks[@]}
+do
+ eval "
+package_iceweasel-i18n-$(echo $lang | tr A-Z a-z) () {
+ install -Dm644 '$srcdir/'*'/upstream/$lang.xpi' \"\$pkgdir\"'$_path/langpack-$lang@firefox.mozilla.org.xpi'
+}
+"
+done
+