]>
Commit | Line | Data |
---|---|---|
6548300e | 1 | include /usr/share/dpkg/default.mk |
e72075d0 | 2 | |
6cbcb5f7 | 3 | PACKAGE=pve-ha-manager |
c0a900cc | 4 | SIMPACKAGE=pve-ha-simulator |
3a1c66d6 | 5 | |
9cdf16b1 | 6 | GITVERSION:=$(shell git rev-parse HEAD) |
df0c583f | 7 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) |
6cbcb5f7 | 8 | |
df0c583f TL |
9 | DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb |
10 | DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb | |
fe3781e8 | 11 | |
df0c583f TL |
12 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc |
13 | SIMDEB=$(SIMPACKAGE)_$(DEB_VERSION)_all.deb | |
14 | SIMDSC=$(SIMPACKAGE)_$(DEB_VERSION).dsc | |
6cbcb5f7 | 15 | |
5ff407da | 16 | all: 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 | 26 | dinstall: $(DEB) $(SIMDEB) |
69e37516 | 27 | dpkg -i $(DEB) $(SIMDEB) |
6cbcb5f7 | 28 | |
fea8212c | 29 | .PHONY: deb |
69e37516 TL |
30 | deb: $(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 |
37 | dsc: |
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 | |
45 | sbuild: $(DSC) | |
46 | sbuild $(DSC) | |
f9362515 | 47 | |
f501f7e3 | 48 | .PHONY: clean |
ba878e35 | 49 | clean: |
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 | |
54 | distclean: clean | |
f501f7e3 | 55 | |
952a637d | 56 | .PHONY: upload |
3de087a5 | 57 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
69e37516 | 58 | upload: $(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) |