projects/aports·blob v2.0.2 · refs

69 lines · 1.2 KiB

1.PHONY: main testing non-free unstable
2
3rootdir := $(shell pwd)
4
5all: main testing non-free unstable
6
7apkbuilds := $(shell find . -maxdepth 3 -name APKBUILD -print)
8
9all-pkgs := $(sort $(subst ./,,$(patsubst %/,%,$(dir $(apkbuilds)))))
10
11main-pkgs := $(shell ./aport.lua deplist $(rootdir) main)
12
13testing-pkgs := $(shell ./aport.lua deplist $(rootdir) testing)
14
15non-free-pkgs := $(shell ./aport.lua deplist $(rootdir) non-free)
16
17unstable-pkgs := $(shell ./aport.lua deplist $(rootdir) unstable)
18
19main:
20 for p in $(main-pkgs) ; \
21 do \
22 cd $(rootdir)/$@/$$p; \
23 abuild -r; \
24 done
25
26testing:
27 for p in $(testing-pkgs) ; \
28 do \
29 cd $(rootdir)/$@/$$p; \
30 abuild -r; \
31 done
32
33non-free:
34 for p in $(non-free-pkgs) ; \
35 do \
36 cd $(rootdir)/$@/$$p; \
37 abuild -r; \
38 done
39
40unstable:
41 for p in $(unstable-pkgs) ; \
42 do \
43 cd $(rootdir)/$@/$$p; \
44 abuild -r; \
45 done
46
47clean:
48 for p in $(all-pkgs) ; do \
49 cd $(rootdir)/$$p; \
50 abuild clean; \
51 abuild cleanpkg; \
52 done
53
54fetch:
55 for p in $(all-pkgs) ; do \
56 cd $(rootdir)/$$p; \
57 abuild fetch; \
58 done
59
60distclean:
61 for p in $(all-pkgs) ; \
62 do \
63 cd $(rootdir)/$$p; \
64 abuild clean; \
65 abuild cleanoldpkg; \
66 abuild cleanpkg; \
67 abuild cleancache; \
68 done
69