]>
Commit | Line | Data |
---|---|---|
82975d22 WB |
1 | TODAY != date '+%Y-%M-%d' |
2 | ||
3 | VERSION := $(TODAY)-1 | |
4 | V_x86_64 := $(VERSION)_x86_64 | |
5 | V_i686 := $(VERSION)_i686 | |
6 | ||
7b25f331 | 7 | all: |
82975d22 WB |
8 | @echo The following targets are available: |
9 | @echo ' $(MAKE) base-x86_64' | |
10 | @echo ' $(MAKE) base-i686' | |
11 | @echo ' $(MAKE) default (same as make base-x86_64)' | |
12 | ||
13 | .PHONY: default | |
14 | default: base-x86_64 | |
15 | ||
16 | # we should always regenerate this: | |
17 | .PHONY: aab.conf aab.conf.x86_64 aab.conf.i686 | |
18 | aab.conf: | |
19 | echo 'Name: base' > aab.conf | |
20 | echo 'Version: $(VERSION)' >> aab.conf | |
21 | echo 'Section: optional' >> aab.conf | |
22 | echo 'Maintainer: Proxmox Support Team <support@proxmox.com>' >> aab.conf | |
23 | echo 'Source: http://archlinux.cu.be/$$repo/os/$$arch' >> aab.conf | |
24 | ||
25 | aab.conf.x86_64: aab.conf | |
26 | echo 'Architecture: x86_64' >> aab.conf | |
27 | aab.conf.i686: aab.conf | |
28 | echo 'Architecture: i686' >> aab.conf | |
29 | ||
30 | .PHONY: base-x86_64 | |
31 | base-x86_64: archlinux-base_$(V_x86_64).tar.gz | |
32 | archlinux-base_$(V_x86_64).tar.gz: aab.conf.x86_64 | |
33 | echo 'Headline: ArchLinux base image.' >> aab.conf | |
34 | $(MAKE) build-current | |
35 | ||
36 | .PHONY: base-xi686 | |
37 | base-i686: archlinux-base_$(V_i686).tar.gz | |
38 | archlinux-base_$(V_i686).tar.gz: aab.conf.i686 | |
39 | echo 'Headline: ArchLinux base image.' >> aab.conf | |
40 | $(MAKE) build-current | |
41 | ||
42 | .PHONY: build-current | |
43 | build-current: check-all | |
44 | ./aab init | |
45 | ./aab bootstrap | |
46 | ./aab finalize | |
47 | ./aab clean | |
48 | ||
49 | .PHONY: check-pacman | |
50 | check-pacman: | |
51 | @which pacman >/dev/null || (echo Dependency error:; echo 'Please install the arch-pacman package'; echo; false) | |
52 | ||
53 | .PHONY: check-root | |
54 | check-root: | |
55 | @test 0 -eq "`id -u`" || (echo Permission error:; echo 'aab needs to be run as root'; echo; false) | |
56 | ||
57 | .PHONY: check-all | |
58 | check-all: check-pacman check-root | |
59 | ||
60 | .PHONY: clean | |
61 | clean: | |
62 | @./aab clean | |
63 | ||
64 | .PHONY: distclean | |
65 | distclean: | |
66 | @./aab dist-clean |