summaryrefslogtreecommitdiff
path: root/mozilla-testing/icecat-i18n/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-testing/icecat-i18n/Makefile')
-rw-r--r--mozilla-testing/icecat-i18n/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/mozilla-testing/icecat-i18n/Makefile b/mozilla-testing/icecat-i18n/Makefile
new file mode 100644
index 000000000..5dd818e62
--- /dev/null
+++ b/mozilla-testing/icecat-i18n/Makefile
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+# Use this script to update the PKGBUILD's list of langpacks.
+# This script depends on:
+# - coreutils
+# - grep
+# - pacman
+# - sed
+# - wget
+
+pkgver=9.0.1
+
+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
+ sed \
+ -e 's/^pkgver=.*/pkgver=$(pkgver)/' \
+ -e "s/_langpacks=.*/_langpacks=(`xargs echo < $<`)/" \
+ -e '/md5sums/,$$d' \
+ $@ > $@.$$$$ && \
+ makepkg -g >> $@.$$$$ && \
+ mv $@.$$$$ $@
+
+clean: PHONY
+ rm -f index.html langpacks.txt *.xpi
+
+.PHONY: PHONY FORCE