summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n/Makefile
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-01-17 00:06:09 -0800
committerroot <root@rshg054.dnsready.net>2013-01-17 00:06:09 -0800
commit4e8c9530dbbf6c8b4c8147cef8fe9845c8898de3 (patch)
tree86de1737558215adb39fdcd56c699257288facca /libre/icecat-l10n/Makefile
parente1c991185c594db7cc8978ed0239ebca4d37560e (diff)
Thu Jan 17 00:06:09 PST 2013
Diffstat (limited to 'libre/icecat-l10n/Makefile')
-rw-r--r--libre/icecat-l10n/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/libre/icecat-l10n/Makefile b/libre/icecat-l10n/Makefile
new file mode 100644
index 000000000..d1aaf7bff
--- /dev/null
+++ b/libre/icecat-l10n/Makefile
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+# Use this script to update the PKGBUILD's list of langpacks.
+# This script depends on:
+# - coreutils
+# - grep
+# - pacman
+# - sed
+# - wget
+
+# Variables:
+_pkgver=10.0
+pkgver=10.0
+pkgrel=1
+
+# Guts: ##############################################################
+
+default: PHONY all
+all: PHONY 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: PKGBUILD.in langpacks.txt Makefile
+ sed \
+ -e 's/@_PKGVER@/$(_pkgver)/' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(`xargs echo < langpacks.txt`)/" \
+ -e '/md5sums/,$$d' \
+ PKGBUILD.in > $@
+ makepkg -dg >> $@
+
+clean: PHONY
+ rm -f index.html langpacks.txt *.xpi
+
+.PHONY: PHONY FORCE