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