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