]> git.proxmox.com Git - pve-ha-manager.git/blob - Makefile
fixup parse_sid call
[pve-ha-manager.git] / Makefile
1 VERSION=2.0
2 PACKAGE=pve-ha-manager
3 SIMPACKAGE=pve-ha-simulator
4 PKGREL=5
5
6 GITVERSION:=$(shell git rev-parse HEAD)
7
8 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
9
10 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
11 SIMDEB=${SIMPACKAGE}_${VERSION}-${PKGREL}_all.deb
12
13
14 all: deb
15
16 .PHONY: dinstall
17 dinstall: $(DEB) $(SIMDEB)
18 dpkg -i ${DEB} ${SIMDEB}
19
20 .PHONY: deb
21 deb: ${DEB} ${SIMDEB}
22 ${DEB}:
23 rm -rf build
24 mkdir build
25 rsync -a src/ build
26 rsync -a debian/ build/debian
27 echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
28 cd build; dpkg-buildpackage -b -us -uc
29 lintian ${DEB}
30 lintian ${SIMDEB}
31
32 .PHONY: clean
33 clean:
34 make -C src clean
35 rm -rf build *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
36 find . -name '*~' -exec rm {} ';'
37
38 .PHONY: distclean
39 distclean: clean
40
41 .PHONY: upload
42 upload: ${DEB} ${SIMDEB}
43 tar cf - ${DEB} ${SIMDEB}|ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
44