summaryrefslogtreecommitdiff
path: root/mozilla-testing/iceweasel-i18n/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-testing/iceweasel-i18n/Makefile')
-rw-r--r--mozilla-testing/iceweasel-i18n/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/mozilla-testing/iceweasel-i18n/Makefile b/mozilla-testing/iceweasel-i18n/Makefile
new file mode 100644
index 000000000..a0a767c3d
--- /dev/null
+++ b/mozilla-testing/iceweasel-i18n/Makefile
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+# Use this script to update the PKGBUILD's list of langpacks.
+# This script depends on:
+# - coreutils
+# - pacman
+# - sed
+
+default: PHONY all
+all: PHONY
+ $(MAKE) clean
+ $(MAKE) PKGBUILD
+.PRECIOUS: PKGBUILD
+
+PKGBUILD.g: Makefile
+ sed \
+ -e '/This line is here/,$$d' \
+ -e 's/^pkgname=/_pkgname=/' \
+ PKGBUILD > $@
+ echo 'pkgname=foo' >> $@
+ echo 'package() { exit 0; }' >> $@
+ makepkg -gp $@ >> $@
+langpacks.txt: PKGBUILD.g Makefile
+ makepkg -dp $<
+ ls src/*/upstream | sed 's/\.xpi//' > $@
+PKGBUILD: langpacks.txt Makefile
+ sed \
+ -e "s/_langpacks=.*/_langpacks=(`xargs echo < $<`)/" \
+ -e '/md5sums/,$$d' \
+ $@ > $@.$$$$ && \
+ makepkg -g >> $@.$$$$ && \
+ mv $@.$$$$ $@
+
+clean: PHONY
+ rm -f PKGBUILD.g langpacks.txt
+
+.PHONY: PHONY FORCE