]> git.proxmox.com Git - pve-ha-manager.git/blob - Makefile
lrm: do not migrate if service already running upon rebalance on start
[pve-ha-manager.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=pve-ha-manager
5 SIMPACKAGE=pve-ha-simulator
6
7 GITVERSION:=$(shell git rev-parse HEAD)
8 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
9
10 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
11 DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
12
13 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
14 SIMDEB=$(SIMPACKAGE)_$(DEB_VERSION)_all.deb
15 SIMDSC=$(SIMPACKAGE)_$(DEB_VERSION).dsc
16
17 all: deb
18
19 $(BUILDDIR):
20 rm -rf $@ $@.tmp
21 cp -a src/ $@.tmp
22 cp -a debian $@.tmp/
23 echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
24 mv $@.tmp $@
25
26 .PHONY: dinstall
27 dinstall: $(DEB) $(SIMDEB)
28 dpkg -i $(DEB) $(SIMDEB)
29
30 .PHONY: deb
31 deb: $(DEB) $(SIMDEB)
32 $(DEB) $(DBG_DEB): $(BUILDDIR)
33 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
34 lintian $(DEB)
35 lintian $(SIMDEB)
36
37 .PHONY: dsc
38 dsc:
39 $(MAKE) clean
40 $(MAKE) $(DSC)
41 lintian $(DSC)
42
43 $(DSC): $(BUILDDIR)
44 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
45
46 sbuild: $(DSC)
47 sbuild $(DSC)
48
49 .PHONY: clean
50 clean:
51 make -C src clean
52 rm -rf $(PACKAGE)-[0-9]*/ *.dsc *.deb $(PACKAGE)*.tar* *.changes *.build *.buildinfo
53
54 .PHONY: distclean
55 distclean: clean
56
57 .PHONY: upload
58 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
59 upload: $(DEB) $(SIMDEB)
60 tar cf - $(DEB) $(DBG_DEB) $(SIMDEB)|ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)