]> git.proxmox.com Git - aab.git/blob - Makefile
bsys: Drop i686 support
[aab.git] / Makefile
1 TODAY != date '+%Y%m%d'
2
3 VERSION := $(TODAY)-1
4 ARCH := amd64
5 V_ARCH := $(VERSION)_$(ARCH)
6
7 PERL := perl -I.
8
9 .PHONY: default
10 default: base-amd64
11
12 # we should always regenerate this:
13 .PHONY: aab.conf
14 aab.conf:
15 echo 'Name: archlinux-base' > aab.conf
16 echo 'Version: $(VERSION)' >> aab.conf
17 echo 'Section: system' >> aab.conf
18 echo 'Maintainer: Proxmox Support Team <support@proxmox.com>' >> aab.conf
19 echo 'Source: http://archlinux.cu.be/$$repo/os/$$arch' >> aab.conf
20 echo 'Architecture: $(ARCH)' >> aab.conf
21 echo 'Headline: ArchLinux base image.' >> aab.conf
22
23 .PHONY: base-$(ARCH)
24 base-$(ARCH): aab.conf archlinux-base_$(V_ARCH).tar.gz
25
26 archlinux-base_$(V_ARCH).tar.gz: build-current
27
28 .PHONY: build-current
29 build-current: check-all
30 $(PERL) ./aab init
31 $(PERL) ./aab bootstrap
32 $(PERL) ./aab finalize
33 $(PERL) ./aab clean
34
35 .PHONY: check-pacman
36 check-pacman:
37 @which pacman >/dev/null || (echo Dependency error:; echo 'Please install the arch-pacman package'; echo; false)
38
39 .PHONY: check-root
40 check-root:
41 @test 0 -eq "`id -u`" || (echo Permission error:; echo 'aab needs to be run as root'; echo; false)
42
43 .PHONY: check-all
44 check-all: check-pacman check-root
45
46 .PHONY: clean
47 clean:
48 @$(PERL) ./aab clean
49
50 .PHONY: distclean
51 distclean:
52 @$(PERL) ./aab dist-clean