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