]> git.proxmox.com Git - pve-ha-manager.git/blame - Makefile
buildsys: use DEB_VERSION_UPSTREAM for buildir
[pve-ha-manager.git] / Makefile
CommitLineData
e72075d0
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
6cbcb5f7 4PACKAGE=pve-ha-manager
c0a900cc 5SIMPACKAGE=pve-ha-simulator
3a1c66d6 6
9cdf16b1 7GITVERSION:=$(shell git rev-parse HEAD)
9db3786b 8BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
6cbcb5f7 9
e72075d0
TL
10DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
11DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
12SIMDEB=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
13SIMDSC=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
6cbcb5f7 14
5ff407da 15all: deb
6cbcb5f7 16
f9362515
TL
17${BUILDDIR}:
18 rm -rf ${BUILDDIR}
19 rsync -a src/ debian ${BUILDDIR}
20 echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
21
745fd425 22.PHONY: dinstall
fea8212c 23dinstall: $(DEB) $(SIMDEB)
c0a900cc 24 dpkg -i ${DEB} ${SIMDEB}
6cbcb5f7 25
fea8212c 26.PHONY: deb
5ff407da 27deb: ${DEB} ${SIMDEB}
f9362515
TL
28${DEB}: ${BUILDDIR}
29 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
6cbcb5f7 30 lintian ${DEB}
1116ca25 31 lintian ${SIMDEB}
3a1c66d6 32
f9362515
TL
33.PHONY: dsc
34dsc: ${DSC}
35${DSC}: ${BUILDDIR}
e72075d0 36 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
f9362515
TL
37 lintian ${DSC}
38
f501f7e3 39.PHONY: clean
ba878e35 40clean:
8cb12b9e 41 make -C src clean
31c1bd1f 42 rm -rf ${BUILDDIR} *.tar.gz *.dsc *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
6cbcb5f7
DM
43 find . -name '*~' -exec rm {} ';'
44
45.PHONY: distclean
46distclean: clean
f501f7e3 47
952a637d
DM
48.PHONY: upload
49upload: ${DEB} ${SIMDEB}
e7958dd4 50 tar cf - ${DEB} ${SIMDEB}|ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${ARCH}
952a637d 51