summaryrefslogtreecommitdiff
path: root/libre/iceweasel-i18n/Makefile
blob: d596111f3041e78599bca557eab77883c481eed2 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f
# Use this script to update the PKGBUILD's list of langpacks.
# This script depends on:
#  - coreutils
#  - pacman
#  - sed

# Variables:
# This is to get it from Debian Sid
debname=iceweasel-l10n
debver=9.0+debian
debrel=1
debrepo=http://ftp.debian.org/debian/pool/main/

pkgver=9.0
pkgrel=2.1

# Guts: ##############################################################

default: PHONY all
all: PHONY
	$(MAKE) clean
	$(MAKE) PKGBUILD
.PRECIOUS: PKGBUILD

PKGBUILD.list: Makefile
	sed \
	  -e 's/@DEBNAME@/$(debname)/' \
	  -e 's/@DEBVER@/$(debver)/' \
	  -e 's/@DEBREL@/$(debrel)/' \
	  -e 's%@DEBREPO@%$(debrepo)%' \
	  -e 's/@PKGVER@/$(pkgver)/' \
	  -e 's/@PKGREL@/$(pkgrel)/' \
	  -e "s/@LANGPACKS@/(phony)/" \
	  -e '/CUT HERE/,$$d' \
	  PKGBUILD.in > $@
	echo 'package() { exit 0; }' >> $@
	makepkg -gp $@ >> $@
langpacks.txt: PKGBUILD.list Makefile
	makepkg -dp $<
	ls src/*/upstream | sed 's/\.xpi//' > $@
PKGBUILD: PKGBUILD.in langpacks.txt Makefile
	sed \
	  -e 's/@DEBNAME@/$(debname)/' \
	  -e 's/@DEBVER@/$(debver)/' \
	  -e 's/@DEBREL@/$(debrel)/' \
	  -e 's%@DEBREPO@%$(debrepo)%' \
	  -e 's/@PKGVER@/$(pkgver)/' \
	  -e 's/@PKGREL@/$(pkgrel)/' \
	  -e "s/@LANGPACKS@/(`xargs echo < langpacks.txt`)/" \
	  -e '/CUT HERE/d' \
	  -e '/md5sums/,$$d' \
	  PKGBUILD.in > $@
	makepkg -dg >> $@

clean: PHONY
	rm -f PKGBUILD.list langpacks.txt

.PHONY: PHONY FORCE