buildsys: introduce BUILDDIR variable
[pve-common.git] / Makefile
CommitLineData
2ebffe56 1VERSION=5.0
008c3bb2 2PKGREL=34
e143e9d8
DM
3
4PACKAGE=libpve-common-perl
5
e143e9d8 6ARCH=all
2131eb50 7GITVERSION:=$(shell git rev-parse HEAD)
b98a06a3 8
dbaa6e52
TL
9BUILDDIR ?= build
10
e143e9d8
DM
11DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
12
13all: ${DEB}
14
15.PHONY: dinstall
16dinstall: deb
17 dpkg -i ${DEB}
18
19
20.PHONY: deb
d5f61909
DM
21deb ${DEB}:
22 $(MAKE) -C test check
dbaa6e52
TL
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
e143e9d8
DM
28 lintian ${DEB}
29
30.PHONY: clean
31clean:
dbaa6e52 32 rm -rf *~ *.deb *.changes ${BUILDDIR} ${PACKAGE}-*.tar.gz *.buildinfo
e143e9d8
DM
33
34.PHONY: distclean
35distclean: clean
36
936218b8
WB
37.PHONY: check
38check:
39 $(MAKE) -C test check
e143e9d8
DM
40
41.PHONY: upload
42upload: ${DEB}
68ab3fce 43 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
e143e9d8 44