]>
Commit | Line | Data |
---|---|---|
a74ba607 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | include /usr/share/dpkg/architecture.mk | |
beb651ee DM |
3 | include defines.mk |
4 | ||
ff7fd641 TL |
5 | export PVERELEASE = $(shell echo $(DEB_VERSION_UPSTREAM) | cut -c 1-3) |
6 | export VERSION = $(DEB_VERSION_UPSTREAM_REVISION) | |
7a961fde | 7 | |
beb651ee DM |
8 | DESTDIR= |
9 | ||
73ed0af1 | 10 | SUBDIRS = aplinfo PVE bin www services configs network-hooks test |
beb651ee | 11 | |
0e77456f | 12 | GITVERSION:=$(shell git rev-parse --short=16 HEAD) |
fb992042 | 13 | |
8df08859 TL |
14 | |
15 | BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM) | |
16 | ||
739e2a4f | 17 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc |
8df08859 | 18 | DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb |
beb651ee | 19 | |
147d67c4 TL |
20 | all: $(SUBDIRS) |
21 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done | |
beb651ee | 22 | |
7f4d4526 | 23 | .PHONY: check |
c15d821e | 24 | check: bin test www |
147d67c4 TL |
25 | $(MAKE) -C bin check |
26 | $(MAKE) -C test check | |
27 | $(MAKE) -C www check | |
53f13052 | 28 | |
beb651ee | 29 | .PHONY: dinstall |
147d67c4 TL |
30 | dinstall: $(DEB) |
31 | dpkg -i $(DEB) | |
beb651ee | 32 | |
8df08859 TL |
33 | $(BUILDDIR): |
34 | rm -rf $@ $@.tmp | |
35 | mkdir $@.tmp | |
36 | rsync -a * $@.tmp | |
37 | echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE | |
38 | echo "REPOID_GENERATED=$(GITVERSION)" > $@.tmp/debian/rules.env | |
39 | mv $@.tmp $@ | |
40 | ||
739e2a4f | 41 | .PHONY: deb dsc |
c27e8e49 | 42 | deb: $(DEB) |
8df08859 TL |
43 | $(DEB): $(BUILDDIR) |
44 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
147d67c4 | 45 | lintian $(DEB) |
beb651ee | 46 | |
739e2a4f TL |
47 | dsc: |
48 | rm -rf $(BUILDDIR) $(DSC) | |
49 | $(MAKE) $(DSC) | |
50 | lintian $(DSC) | |
51 | $(DSC): $(BUILDDIR) | |
52 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
53 | ||
54 | sbuild: $(DSC) | |
55 | sbuild $< | |
56 | ||
beb651ee | 57 | .PHONY: upload |
e36407c2 TL |
58 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
59 | upload: $(DEB) | |
60 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST) | |
beb651ee | 61 | |
beb651ee | 62 | .PHONY: install |
6ebc0106 | 63 | install: vzdump-hook-script.pl |
147d67c4 TL |
64 | install -d -m 0700 -o www-data -g www-data $(DESTDIR)/var/log/pveproxy |
65 | install -d $(DOCDIR)/examples | |
66 | install -d $(DESTDIR)/var/lib/$(PACKAGE) | |
67 | install -d $(DESTDIR)/var/lib/vz/images | |
68 | install -d $(DESTDIR)/var/lib/vz/template/cache | |
69 | install -d $(DESTDIR)/var/lib/vz/template/iso | |
70 | install -m 0644 vzdump-hook-script.pl $(DOCDIR)/examples/vzdump-hook-script.pl | |
71 | install -m 0644 spice-example-sh $(DOCDIR)/examples/spice-example-sh | |
72 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done | |
beb651ee DM |
73 | |
74 | .PHONY: distclean | |
75 | distclean: clean | |
beb651ee DM |
76 | |
77 | .PHONY: clean | |
78 | clean: | |
147d67c4 | 79 | set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done |
739e2a4f | 80 | rm -f $(PACKAGE)*.tar* country.dat *.deb *.dsc *.build *.buildinfo *.changes |
8df08859 | 81 | rm -rf dest $(PACKAGE)-[0-9]*/ |