summaryrefslogtreecommitdiff
path: root/mozilla-testing
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
parent0c14c3dd36e1c2f529ffa248383a275cfb21f168 (diff)
change the ice{cat,weasel}-i18n update systems to use autoconf-style PKGBUILD.in files (more robust)
Diffstat (limited to 'mozilla-testing')
-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
-rw-r--r--mozilla-testing/iceweasel-i18n/.gitignore2
-rw-r--r--mozilla-testing/iceweasel-i18n/Makefile47
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD10
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD.in57
7 files changed, 158 insertions, 28 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
+
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..eb4b72af7 100644
--- a/mozilla-testing/iceweasel-i18n/PKGBUILD
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD
@@ -1,10 +1,10 @@
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# 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 +19,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')
@@ -42,7 +41,6 @@ build() {
_path="/usr/lib/iceweasel-${_pkgver}/extensions"
-# This line is here for auto-regeneration purposes. DO NOT EDIT!
for lang in ${_langpacks[@]}
do
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD.in b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
new file mode 100644
index 000000000..a912414b8
--- /dev/null
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
@@ -0,0 +1,57 @@
+# 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")
+noextract=($(for lang in ${_langpacks[@]}
+ do echo $lang.xpi
+ done))
+
+build() {
+ cd "${srcdir}"
+ # This will simulate dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
+ cd "${_debname}-${_debver}"
+ patch -p1 -i "${srcdir}/${_debname}_${_debver}-${_debrel}.diff"
+}
+
+_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
+