build: inline $GITVERSION
[pve-common.git] / Makefile
CommitLineData
2ebffe56 1VERSION=5.0
51d41234 2PKGREL=40
e143e9d8
DM
3
4PACKAGE=libpve-common-perl
5
e143e9d8 6ARCH=all
b98a06a3 7
dbaa6e52
TL
8BUILDDIR ?= build
9
e143e9d8 10DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
b1766d78
FG
11DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
12TARGZ=${PACKAGE}_${VERSION}-${PKGREL}.tar.gz
e143e9d8 13
b1766d78
FG
14all:
15 ${MAKE} -C src
e143e9d8
DM
16
17.PHONY: dinstall
18dinstall: deb
19 dpkg -i ${DEB}
20
b1766d78 21${BUILDDIR}: src debian
dbaa6e52 22 rm -rf ${BUILDDIR}
b1766d78 23 rsync -a * ${BUILDDIR}
c11de017 24 echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout $(shell git rev-parse HEAD)" > ${BUILDDIR}/debian/SOURCE
b1766d78
FG
25
26.PHONY: deb
27deb: ${DEB}
28${DEB}: ${BUILDDIR}
dbaa6e52 29 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
e143e9d8
DM
30 lintian ${DEB}
31
b1766d78
FG
32.PHONY: dsc
33dsc ${TARGZ}: ${DSC}
34${DSC}: ${BUILDDIR}
35 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
36 lintian ${DSC}
37
82ad3144 38.PHONY: clean distclean
e143e9d8 39distclean: clean
82ad3144 40clean:
b1766d78 41 rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo *.dsc *.tar.gz
e143e9d8 42
936218b8
WB
43.PHONY: check
44check:
45 $(MAKE) -C test check
e143e9d8 46
b1766d78
FG
47.PHONY: install
48install:
49 ${MAKE} -C src install
50
e143e9d8
DM
51.PHONY: upload
52upload: ${DEB}
68ab3fce 53 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
e143e9d8 54