]> git.proxmox.com Git - pve-ha-manager.git/blob - Makefile
manager: make crs a full blown hash
[pve-ha-manager.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=pve-ha-manager
5 SIMPACKAGE=pve-ha-simulator
6
7 GITVERSION:=$(shell git rev-parse HEAD)
8 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
9
10 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
11 DBG_DEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
12
13 DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
14 SIMDEB=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
15 SIMDSC=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
16
17 all: deb
18
19 ${BUILDDIR}:
20 rm -rf ${BUILDDIR}
21 rsync -a src/ debian ${BUILDDIR}
22 echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
23
24 .PHONY: dinstall
25 dinstall: $(DEB) $(SIMDEB)
26 dpkg -i ${DEB} ${SIMDEB}
27
28 .PHONY: deb
29 deb: ${DEB} ${SIMDEB}
30 ${DEB} ${DBG_DEB}: ${BUILDDIR}
31 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
32 lintian ${DEB}
33 lintian ${SIMDEB}
34
35 .PHONY: dsc
36 dsc: ${DSC}
37 ${DSC}: ${BUILDDIR}
38 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
39 lintian ${DSC}
40
41 .PHONY: clean
42 clean:
43 make -C src clean
44 rm -rf ${BUILDDIR} *.tar.gz *.dsc *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
45 find . -name '*~' -exec rm {} ';'
46
47 .PHONY: distclean
48 distclean: clean
49
50 .PHONY: upload
51 upload: ${DEB} ${SIMDEB}
52 tar cf - ${DEB} ${DBG_DEB} ${SIMDEB}|ssh repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch ${DEB_BUILD_ARCH}
53