]> git.proxmox.com Git - pve-common.git/blob - Makefile
buildsys: refactor distclean and clean target
[pve-common.git] / Makefile
1 VERSION=5.0
2 PKGREL=34
3
4 PACKAGE=libpve-common-perl
5
6 ARCH=all
7 GITVERSION:=$(shell git rev-parse HEAD)
8
9 BUILDDIR ?= build
10
11 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
12
13 all: ${DEB}
14
15 .PHONY: dinstall
16 dinstall: deb
17 dpkg -i ${DEB}
18
19
20 .PHONY: deb
21 deb ${DEB}:
22 $(MAKE) -C test check
23 rm -rf ${BUILDDIR}
24 rsync -a src/ ${BUILDDIR}
25 rsync -a debian/ ${BUILDDIR}/debian
26 echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
27 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
28 lintian ${DEB}
29
30 .PHONY: clean distclean
31 distclean: clean
32 clean:
33 rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo
34
35 .PHONY: check
36 check:
37 $(MAKE) -C test check
38
39 .PHONY: upload
40 upload: ${DEB}
41 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
42