summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <andre@pc-01.localdomain>2012-05-24 13:11:48 -0300
committerAndré Fabian Silva Delgado <andre@pc-01.localdomain>2012-05-24 13:11:48 -0300
commit960a229bf710546037d674ca530b0a4b6a857abb (patch)
tree25b0f06dae479376e989bb751f94c3077e4b9e6f /libre
parent22a405b922ffb0604e0a0e249a52c1387fc66852 (diff)
downloadabslibre-960a229bf710546037d674ca530b0a4b6a857abb.tar.gz
abslibre-960a229bf710546037d674ca530b0a4b6a857abb.tar.bz2
abslibre-960a229bf710546037d674ca530b0a4b6a857abb.zip
iceape-i18n-2.7.4.2-1: Langpacks for Iceape
Diffstat (limited to 'libre')
-rw-r--r--libre/iceape-i18n/.gitignore3
-rw-r--r--libre/iceape-i18n/Makefile59
-rw-r--r--libre/iceape-i18n/PKGBUILD81
-rw-r--r--libre/iceape-i18n/PKGBUILD.in64
4 files changed, 207 insertions, 0 deletions
diff --git a/libre/iceape-i18n/.gitignore b/libre/iceape-i18n/.gitignore
new file mode 100644
index 000000000..3e1eb57b5
--- /dev/null
+++ b/libre/iceape-i18n/.gitignore
@@ -0,0 +1,3 @@
+PKGBUILD.list
+langpacks.txt
+*.diff.gz
diff --git a/libre/iceape-i18n/Makefile b/libre/iceape-i18n/Makefile
new file mode 100644
index 000000000..89aaccfdc
--- /dev/null
+++ b/libre/iceape-i18n/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-i18n/PKGBUILD b/libre/iceape-i18n/PKGBUILD
new file mode 100644
index 000000000..3c0b42b31
--- /dev/null
+++ b/libre/iceape-i18n/PKGBUILD
@@ -0,0 +1,81 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer: André Silva <andre.paulista@adinet.com.uy>
+# 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.4
+_debrel=2
+_debrepo=http://ftp.debian.org/debian/pool/main/
+debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
+
+_langpacks=(be ca cs de en-GB es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN)
+
+pkgbase=iceape-i18n
+pkgname=($(for lang in ${_langpacks[@]}
+ do echo $pkgbase-$lang | tr A-Z a-z
+ done))
+_pkgver=2.7.4
+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
+
+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-i18n-$(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=('6d773ee12e9e3475f20f7ae1a13ae60b'
+ 'cce134a647f71808c15d3a693c6e0d91'
+ '289b5df66a7bf79a900f7033f034b941'
+ '90f7836b6dbe752fe0eb6e85be961dad'
+ '46f6170f7ca9a0e7d1be7cf2da411089'
+ '16fcf9e6c74a25ec164e4d0d9be7a9d4'
+ 'ad7eb7ff8ec821d3bb8baedb4c83b9a1'
+ '612ed06337160596629f92699bc9dc08'
+ '8204487072c23d70c1332c32b75850f1'
+ 'd653627ccc8f188d8f908ad60ee9c10d'
+ '146e7bb6829b44c9b971d271a9682f47'
+ 'eed45ddcec761bb76eec33ca26b8f869'
+ '0fb90f7c8de00ddcf7dc500264979cba'
+ '3454cfd4e79a7a2ef2a519133f57a5a7'
+ '880b81a89f71851f146e3e8bb45c0215'
+ 'e219a4a6a277edf7da1ecaf29203887f'
+ '9dff81762577df8b105912457a8ebdcd'
+ 'a7431be429fc93dc9876e3376441855b'
+ '19cb8a522fc38aeabdf375c2118efe7a'
+ '7d1e1f279bf3786917b11168251ced57'
+ '918022ba06904a99caffa5654a47f8b3'
+ '138d693f00d34ed8f943fca053e9e876')
diff --git a/libre/iceape-i18n/PKGBUILD.in b/libre/iceape-i18n/PKGBUILD.in
new file mode 100644
index 000000000..6891b2672
--- /dev/null
+++ b/libre/iceape-i18n/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
+