summaryrefslogtreecommitdiff
path: root/mozilla-testing/iceweasel-i18n
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2011-12-31 23:02:11 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2011-12-31 23:02:11 +0100
commit007fa4a3de674cd44c9b4609d8567facc307de51 (patch)
treecc49e877b073844ef40c26218eb10ad326a154a5 /mozilla-testing/iceweasel-i18n
parent6fe37f4d0d58fef7e918c59a8c22a2d7169db64d (diff)
parentc7939f2babc29899c41dfbad83b967b8f832ee85 (diff)
downloadabslibre-007fa4a3de674cd44c9b4609d8567facc307de51.tar.gz
abslibre-007fa4a3de674cd44c9b4609d8567facc307de51.tar.bz2
abslibre-007fa4a3de674cd44c9b4609d8567facc307de51.zip
Merge branch 'master' of git+ssh://parabola-git/abslibre
Diffstat (limited to 'mozilla-testing/iceweasel-i18n')
-rw-r--r--mozilla-testing/iceweasel-i18n/.gitignore2
-rw-r--r--mozilla-testing/iceweasel-i18n/Makefile47
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD28
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD.in63
4 files changed, 117 insertions, 23 deletions
diff --git a/mozilla-testing/iceweasel-i18n/.gitignore b/mozilla-testing/iceweasel-i18n/.gitignore
index bff578e20..3e1eb57b5 100644
--- a/mozilla-testing/iceweasel-i18n/.gitignore
+++ b/mozilla-testing/iceweasel-i18n/.gitignore
@@ -1,3 +1,3 @@
-PKGBUILD.*
+PKGBUILD.list
langpacks.txt
*.diff.gz
diff --git a/mozilla-testing/iceweasel-i18n/Makefile b/mozilla-testing/iceweasel-i18n/Makefile
index a0a767c3d..64e140af6 100644
--- a/mozilla-testing/iceweasel-i18n/Makefile
+++ b/mozilla-testing/iceweasel-i18n/Makefile
@@ -5,32 +5,55 @@
# - pacman
# - sed
+# Variables:
+# This is to get it from Debian Sid
+debname=iceweasel-l10n
+debver=9.0+debian
+debrel=1
+debrepo=http://ftp.debian.org/debian/pool/main/
+
+pkgver=9.0
+pkgrel=2
+
+# Guts: ##############################################################
+
default: PHONY all
all: PHONY
$(MAKE) clean
$(MAKE) PKGBUILD
.PRECIOUS: PKGBUILD
-PKGBUILD.g: Makefile
+PKGBUILD.list: Makefile
sed \
- -e '/This line is here/,$$d' \
- -e 's/^pkgname=/_pkgname=/' \
- PKGBUILD > $@
- echo 'pkgname=foo' >> $@
+ -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.g Makefile
+langpacks.txt: PKGBUILD.list Makefile
makepkg -dp $<
ls src/*/upstream | sed 's/\.xpi//' > $@
-PKGBUILD: langpacks.txt Makefile
+PKGBUILD: PKGBUILD.in langpacks.txt Makefile
sed \
- -e "s/_langpacks=.*/_langpacks=(`xargs echo < $<`)/" \
+ -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' \
- $@ > $@.$$$$ && \
- makepkg -g >> $@.$$$$ && \
- mv $@.$$$$ $@
+ PKGBUILD.in > $@
+ makepkg -dg >> $@
clean: PHONY
- rm -f PKGBUILD.g langpacks.txt
+ rm -f PKGBUILD.list langpacks.txt
.PHONY: PHONY FORCE
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD b/mozilla-testing/iceweasel-i18n/PKGBUILD
index 45555b019..8a744f7a5 100644
--- a/mozilla-testing/iceweasel-i18n/PKGBUILD
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD
@@ -1,10 +1,13 @@
# 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:
-# - Update pkgver= and _deb*= below.
-# - Run "make". This will do everything else for you.
+# - Edit variables in in Makefile.
+# - (optionally) edit PKGBUILD.in
+# - Run 'make'. It will take care of everything else for you.
-# We're getting this from Debian Sid
_debname=iceweasel-l10n
_debver=9.0+debian
_debrel=1
@@ -19,8 +22,7 @@ pkgname=($(for lang in ${_langpacks[@]}
done))
_pkgver=9.0
pkgver=${_debver}.${_debrel}
-pkgrel=1
-
+pkgrel=2
pkgdesc="Language packs for Debian Iceweasel."
arch=('any')
@@ -28,21 +30,26 @@ 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}.diff.gz"
+ "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc")
noextract=($(for lang in ${_langpacks[@]}
do echo $lang.xpi
done))
-build() {
- cd "${srcdir}"
+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"
-# This line is here for auto-regeneration purposes. DO NOT EDIT!
for lang in ${_langpacks[@]}
do
@@ -54,4 +61,5 @@ package_iceweasel-i18n-$(echo $lang | tr A-Z a-z) () {
done
md5sums=('d0dc0653b9d7642e6d346b54fb1782ae'
- '493920a716fa40daeb5bd8cdfdbfe6a6')
+ '493920a716fa40daeb5bd8cdfdbfe6a6'
+ 'd03f6db3a354e9208500898738506e50')
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
+