blob: a0a767c3d988facf1e4b2f75690cca424e91e943 (
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
|
#!/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
|