]> git.proxmox.com Git - pve-ha-manager.git/blame - Makefile
buildsys: use dpkg default makefile snippet
[pve-ha-manager.git] / Makefile
CommitLineData
6548300e 1include /usr/share/dpkg/default.mk
e72075d0 2
6cbcb5f7 3PACKAGE=pve-ha-manager
c0a900cc 4SIMPACKAGE=pve-ha-simulator
3a1c66d6 5
9cdf16b1 6GITVERSION:=$(shell git rev-parse HEAD)
df0c583f 7BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
6cbcb5f7 8
df0c583f
TL
9DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
10DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
fe3781e8 11
df0c583f
TL
12DSC=$(PACKAGE)_$(DEB_VERSION).dsc
13SIMDEB=$(SIMPACKAGE)_$(DEB_VERSION)_all.deb
14SIMDSC=$(SIMPACKAGE)_$(DEB_VERSION).dsc
6cbcb5f7 15
5ff407da 16all: deb
6cbcb5f7 17
69e37516 18$(BUILDDIR):
1b91242a
TL
19 rm -rf $@ $@.tmp
20 cp -a src/ $@.tmp
21 cp -a debian $@.tmp/
22 echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
23 mv $@.tmp $@
f9362515 24
745fd425 25.PHONY: dinstall
fea8212c 26dinstall: $(DEB) $(SIMDEB)
69e37516 27 dpkg -i $(DEB) $(SIMDEB)
6cbcb5f7 28
fea8212c 29.PHONY: deb
69e37516
TL
30deb: $(DEB) $(SIMDEB)
31$(DEB) $(DBG_DEB): $(BUILDDIR)
32 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
33 lintian $(DEB)
34 lintian $(SIMDEB)
3a1c66d6 35
f9362515 36.PHONY: dsc
cfe90116
TL
37dsc:
38 $(MAKE) clean
39 $(MAKE) $(DSC)
40 lintian $(DSC)
41
69e37516
TL
42$(DSC): $(BUILDDIR)
43 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
cfe90116
TL
44
45sbuild: $(DSC)
46 sbuild $(DSC)
f9362515 47
f501f7e3 48.PHONY: clean
ba878e35 49clean:
8cb12b9e 50 make -C src clean
cfe90116 51 rm -rf $(PACKAGE)-[0-9]*/ *.dsc *.deb $(PACKAGE)*.tar* *.changes *.build *.buildinfo
6cbcb5f7
DM
52
53.PHONY: distclean
54distclean: clean
f501f7e3 55
952a637d 56.PHONY: upload
3de087a5 57upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
69e37516 58upload: $(DEB) $(SIMDEB)
3de087a5 59 tar cf - $(DEB) $(DBG_DEB) $(SIMDEB)|ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)