]> git.proxmox.com Git - pve-cluster.git/blob - Makefile
pvecm: fix cluster join over ssh with newer rsync
[pve-cluster.git] / Makefile
1 include /usr/share/dpkg/default.mk
2
3 PACKAGE=pve-cluster
4 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
5 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
6
7 GITVERSION:=$(shell git rev-parse HEAD)
8
9 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
10 LIB_DEB = libpve-cluster-perl_$(DEB_VERSION)_all.deb
11 LIB_DEB += libpve-cluster-api-perl_$(DEB_VERSION)_all.deb
12 DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
13
14 DEBS = $(DEB) $(DBG_DEB) $(LIB_DEB)
15
16 all: $(DEB) $(DBG_DEB)
17
18 $(BUILDDIR):
19 rm -rf $@ $@.tmp
20 cp -a src $@.tmp
21 cp -a debian $@.tmp/
22 echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
23 mv $@.tmp $@
24
25 dsc: $(DSC)
26 $(DSC): $(BUILDDIR)
27 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
28 lintian $(DSC)
29
30 .PHONY: deb
31 deb $(DBG_DEB) $(LIB_DEB): $(DEB)
32 $(DEB): $(BUILDDIR)
33 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
34 lintian $(DEB)
35
36 sbuild: $(DSC)
37 sbuild $(DSC)
38
39 .PHONY: dinstall
40 dinstall: $(DEB) $(LIB_DEB)
41 dpkg -i $^
42
43 .PHONY: upload
44 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
45 upload: $(DEBS)
46 tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_BUILD_ARCH)
47
48 .PHONY: clean
49 clean:
50 rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build *.tar.*