#!/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