summaryrefslogtreecommitdiff
path: root/libre/icecat-i18n/Makefile
blob: d1aaf7bff3206115884d1ad670c5e7a5a4456ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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