]> git.proxmox.com Git - pve-manager.git/blame - Makefile
ui: acme: add External Account Binding (EAB) related fields
[pve-manager.git] / Makefile
CommitLineData
38909c46 1include /usr/share/dpkg/default.mk
beb651ee
DM
2include defines.mk
3
a74e269c 4export PVERELEASE = $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1-2)
ff7fd641 5export VERSION = $(DEB_VERSION_UPSTREAM_REVISION)
7a961fde 6
8df08859
TL
7BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
8
739e2a4f 9DSC=$(PACKAGE)_$(DEB_VERSION).dsc
8df08859 10DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
beb651ee 11
38909c46
TL
12DESTDIR=
13SUBDIRS = aplinfo PVE bin www services configs network-hooks test
14
147d67c4
TL
15all: $(SUBDIRS)
16 set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
beb651ee 17
7f4d4526 18.PHONY: check
c15d821e 19check: bin test www
147d67c4
TL
20 $(MAKE) -C bin check
21 $(MAKE) -C test check
22 $(MAKE) -C www check
53f13052 23
38909c46 24GITVERSION:=$(shell git rev-parse --short=16 HEAD)
8df08859
TL
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
739e2a4f 33.PHONY: deb dsc
c27e8e49 34deb: $(DEB)
8df08859
TL
35$(DEB): $(BUILDDIR)
36 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
147d67c4 37 lintian $(DEB)
beb651ee 38
739e2a4f
TL
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
beb651ee 49.PHONY: upload
e36407c2
TL
50upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
51upload: $(DEB)
52 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
beb651ee 53
beb651ee 54.PHONY: install
6ebc0106 55install: vzdump-hook-script.pl
147d67c4
TL
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
beb651ee
DM
65
66.PHONY: distclean
67distclean: clean
beb651ee
DM
68
69.PHONY: clean
70clean:
147d67c4 71 set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
739e2a4f 72 rm -f $(PACKAGE)*.tar* country.dat *.deb *.dsc *.build *.buildinfo *.changes
8df08859 73 rm -rf dest $(PACKAGE)-[0-9]*/
38909c46
TL
74
75.PHONY: dinstall
76dinstall: $(DEB)
77 dpkg -i $(DEB)