]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | include /usr/share/dpkg/architecture.mk | |
3 | include defines.mk | |
4 | ||
5 | export PVERELEASE=$(DEB_VERSION_UPSTREAM) | |
6 | export VERSION=$(DEB_VERSION_UPSTREAM_REVISION) | |
7 | ||
8 | DESTDIR= | |
9 | ||
10 | SUBDIRS = aplinfo PVE bin www services configs network-hooks test | |
11 | ||
12 | GITVERSION:=$(shell git rev-parse --short=16 HEAD) | |
13 | ||
14 | DEB=$(PACKAGE)_$(VERSION)_$(DEB_HOST_ARCH).deb | |
15 | ||
16 | all: $(SUBDIRS) | |
17 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done | |
18 | ||
19 | .PHONY: check | |
20 | check: bin test www | |
21 | $(MAKE) -C bin check | |
22 | $(MAKE) -C test check | |
23 | $(MAKE) -C www check | |
24 | ||
25 | .PHONY: dinstall | |
26 | dinstall: $(DEB) | |
27 | dpkg -i $(DEB) | |
28 | ||
29 | .PHONY: deb | |
30 | deb: $(DEB) | |
31 | $(DEB): | |
32 | rm -rf dest | |
33 | mkdir dest | |
34 | rsync -a * dest | |
35 | echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout $(GITVERSION)" > dest/debian/SOURCE | |
36 | echo "REPOID_GENERATED=$(GITVERSION)" > dest/debian/rules.env | |
37 | cd dest; dpkg-buildpackage -b -us -uc | |
38 | lintian $(DEB) | |
39 | ||
40 | .PHONY: upload | |
41 | upload: $(DEB) check | |
42 | # check if working directory is clean | |
43 | git diff --exit-code --stat && git diff --exit-code --stat --staged | |
44 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye | |
45 | ||
46 | .PHONY: install | |
47 | install: vzdump-hook-script.pl | |
48 | install -d -m 0700 -o www-data -g www-data $(DESTDIR)/var/log/pveproxy | |
49 | install -d $(DOCDIR)/examples | |
50 | install -d $(DESTDIR)/var/lib/$(PACKAGE) | |
51 | install -d $(DESTDIR)/var/lib/vz/images | |
52 | install -d $(DESTDIR)/var/lib/vz/template/cache | |
53 | install -d $(DESTDIR)/var/lib/vz/template/iso | |
54 | install -m 0644 vzdump-hook-script.pl $(DOCDIR)/examples/vzdump-hook-script.pl | |
55 | install -m 0644 spice-example-sh $(DOCDIR)/examples/spice-example-sh | |
56 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done | |
57 | ||
58 | .PHONY: distclean | |
59 | distclean: clean | |
60 | ||
61 | .PHONY: clean | |
62 | clean: | |
63 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done | |
64 | rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp |