summaryrefslogtreecommitdiff
path: root/libre/iceape-l10n
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-01-15 20:46:04 -0200
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-01-15 20:46:04 -0200
commitdae8f7d9f878540a792044e711bfec1dfef28165 (patch)
tree42313edf08b2421ecbbc759ddd6dc3fdc9a8f543 /libre/iceape-l10n
parentd781171e1fe9ede079e643769d8108851fbd59a5 (diff)
iceape-l10n-2.7.11-1: changing from i18n to l10n
Diffstat (limited to 'libre/iceape-l10n')
-rw-r--r--libre/iceape-l10n/.gitignore3
-rw-r--r--libre/iceape-l10n/Makefile59
-rw-r--r--libre/iceape-l10n/PKGBUILD88
-rw-r--r--libre/iceape-l10n/PKGBUILD.in64
4 files changed, 214 insertions, 0 deletions
diff --git a/libre/iceape-l10n/.gitignore b/libre/iceape-l10n/.gitignore
new file mode 100644
index 000000000..3e1eb57b5
--- /dev/null
+++ b/libre/iceape-l10n/.gitignore
@@ -0,0 +1,3 @@
+PKGBUILD.list
+langpacks.txt
+*.diff.gz
diff --git a/libre/iceape-l10n/Makefile b/libre/iceape-l10n/Makefile
new file mode 100644
index 000000000..89aaccfdc
--- /dev/null
+++ b/libre/iceape-l10n/Makefile
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+# Use this script to update the PKGBUILD's list of langpacks.
+# This script depends on:
+# - coreutils
+# - pacman
+# - sed
+
+# Variables:
+# This is to get it from Debian Sid
+debname=iceape-l10n
+debver=2.7.4+debian
+debrel=2
+debrepo=http://ftp.debian.org/debian/pool/main/
+
+pkgver=2.7.4
+pkgrel=1
+
+# Guts: ##############################################################
+
+default: PHONY all
+all: PHONY
+ $(MAKE) clean
+ $(MAKE) PKGBUILD
+.PRECIOUS: PKGBUILD
+
+PKGBUILD.list: Makefile
+ sed \
+ -e 's/@DEBNAME@/$(debname)/' \
+ -e 's/@DEBVER@/$(debver)/' \
+ -e 's/@DEBREL@/$(debrel)/' \
+ -e 's%@DEBREPO@%$(debrepo)%' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(phony)/" \
+ -e '/CUT HERE/,$$d' \
+ PKGBUILD.in > $@
+ echo 'package() { exit 0; }' >> $@
+ makepkg -gp $@ >> $@
+langpacks.txt: PKGBUILD.list Makefile
+ makepkg -dp $<
+ ls src/*/upstream | sed 's/\.xpi//' > $@
+PKGBUILD: PKGBUILD.in langpacks.txt Makefile
+ sed \
+ -e 's/@DEBNAME@/$(debname)/' \
+ -e 's/@DEBVER@/$(debver)/' \
+ -e 's/@DEBREL@/$(debrel)/' \
+ -e 's%@DEBREPO@%$(debrepo)%' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(`xargs echo < langpacks.txt`)/" \
+ -e '/CUT HERE/d' \
+ -e '/md5sums/,$$d' \
+ PKGBUILD.in > $@
+ makepkg -dg >> $@
+
+clean: PHONY
+ rm -f PKGBUILD.list langpacks.txt
+
+.PHONY: PHONY FORCE
diff --git a/libre/iceape-l10n/PKGBUILD b/libre/iceape-l10n/PKGBUILD
new file mode 100644
index 000000000..5ad18ba5c
--- /dev/null
+++ b/libre/iceape-l10n/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+# 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=iceape
+_debver=2.7.11
+_debrel=1
+_debrepo=http://ftp.debian.org/debian/pool/main/
+debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
+lowercase() { tr A-Z a-z <<<"$*"; }
+
+_langpacks=(be ca cs de en-GB es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN)
+
+pkgbase=iceape-l10n
+pkgname=($(for lang in ${_langpacks[@]}
+ do echo $pkgbase-$lang | tr A-Z a-z
+ done))
+_pkgver=2.7.11
+pkgver=${_debver}.${_debrel}
+pkgrel=1
+
+pkgdesc="Language packs for Debian Iceape."
+arch=('any')
+url="http://packages.debian.org/source/sid/iceape"
+license=('MPL')
+depends=("iceape-libre>=$pkgver")
+
+source=()
+for lang in ${_langpacks[@]}
+do
+ source+=("${_debrepo}/`debfile ${_debname}`-l10n-$(echo $lang | tr A-Z a-z)_${_debver}-${_debrel}_all.deb")
+done
+
+replaces=(iceape-i18n-$(lowercase "${lang}"))
+conflicts=(iceape-i18n-$(lowercase "${lang}"))
+
+build() {
+ cd "${srcdir}"
+ for f in *.deb
+ do
+ bsdtar xf $f
+ bsdtar xf data.tar.gz
+ done
+}
+
+_path="/usr/lib/iceape/extensions"
+
+
+for lang in ${_langpacks[@]}
+do
+ eval "
+package_iceape-l10n-$(echo $lang | tr A-Z a-z)() {
+ install -Dm644 \"\$srcdir$_path/langpack-$lang@iceape.mozilla.org.xpi\" \"\$pkgdir$_path/langpack-$lang@iceape.mozilla.org.xpi\"
+}
+"
+done
+
+md5sums=('fb27360aff6250e7d483803583a5cd78'
+ '236c7aacd7e6416a37aff95f7bfa6a80'
+ 'f17d76128ab529415078cafe63b61d50'
+ '07a5c72158427db8c5a990be6eb2d036'
+ 'fddbcf27d00f1f4d92fed197ace8dd1b'
+ '96eb3291200c44ffdc3ab1d1446f00b7'
+ '04dec3bee388ae66cd434342ab03074f'
+ 'bdef8b38501e7d6805b5304ef2bf8425'
+ '90b5d0ab0ab2eb3b75e5f80cb6d289bb'
+ '97f940c39b84a90b0e16eaeca4fa7806'
+ '34644b44381ae1da46f2fa308fd1cf34'
+ 'a6240664344798568276dd5dbdd27fb2'
+ '61aedef6a89b400584dde82b5e97ff0f'
+ 'abe7a9172876b30c4677b1f4c2237fc9'
+ '60f3c543fbdb72cc12aef8f2369101ff'
+ 'c002da281c0d0fa357f92edd2b8cd12c'
+ 'c17ab30f25f05024879afdf85fa4c516'
+ '250a08a999d6d1d6086ffbd17d60fbb4'
+ '609ce8793ea0d5465da7195e4d956fef'
+ '060226599bac5bc8ddb64417ef1a0108'
+ 'eaa827909690bfa8dfdc621164e23ca8'
+ '3fb66893b5ea3b959de48ef16fb26c74'
+ '6f2d77e767efa0b0d4cb56df9ccd0a2f')
diff --git a/libre/iceape-l10n/PKGBUILD.in b/libre/iceape-l10n/PKGBUILD.in
new file mode 100644
index 000000000..6891b2672
--- /dev/null
+++ b/libre/iceape-l10n/PKGBUILD.in
@@ -0,0 +1,64 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: fauno <fauno@kiwwwi.com.ar>
+# Contributor: Figue <ffigue@gmail.com>
+# Contributor: André Silva <andre.paulista@adinet.com.uy>
+# 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=iceape-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 Iceape."
+arch=('any')
+url="http://packages.debian.org/source/sid/iceape"
+license=('MPL')
+depends=("iceape=$_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/iceape-${_pkgver}/extensions"
+
+# CUT HERE <-- Separates package_*() functions from everything else.
+
+for lang in ${_langpacks[@]}
+do
+ eval "
+package_iceape-i18n-$(echo $lang | tr A-Z a-z) () {
+ install -Dm644 '$srcdir/'*'/upstream/$lang.xpi' \"\$pkgdir\"'$_path/langpack-$lang@firefox.mozilla.org.xpi'
+}
+"
+done
+