]> git.proxmox.com Git - pve-common.git/blobdiff - Makefile
cgroup: cpu quota: fix resetting period length for v1
[pve-common.git] / Makefile
index 31fb359fc95ef0622bad7a71b8abe2a8f9dcbbac..44a74e99cdd5f360ca0802fe79764c70382125ee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,14 @@
-VERSION=6.0
-PKGREL=1
+include /usr/share/dpkg/pkg-info.mk
 
 PACKAGE=libpve-common-perl
 
 ARCH=all
 
-BUILDDIR ?= ${PACKAGE}-${VERSION}
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
-DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
-DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
-TARGZ=${PACKAGE}_${VERSION}-${PKGREL}.tar.gz
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+TARGZ=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.tar.gz
 
 all:
        ${MAKE} -C src
@@ -18,10 +17,11 @@ all:
 dinstall: deb
        dpkg -i ${DEB}
 
-${BUILDDIR}: src debian
-       rm -rf ${BUILDDIR}
-       rsync -a * ${BUILDDIR}
-       echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout $(shell git rev-parse HEAD)" > ${BUILDDIR}/debian/SOURCE
+${BUILDDIR}: src debian test
+       rm -rf ${BUILDDIR} ${BUILDDIR}.tmp; mkdir ${BUILDDIR}.tmp
+       cp -a -t ${BUILDDIR}.tmp $^ Makefile
+       echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout $(shell git rev-parse HEAD)" > ${BUILDDIR}.tmp/debian/SOURCE
+       mv ${BUILDDIR}.tmp ${BUILDDIR}
 
 .PHONY: deb
 deb: ${DEB}
@@ -38,7 +38,7 @@ ${DSC}: ${BUILDDIR}
 .PHONY: clean distclean
 distclean: clean
 clean:
-       rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo *.dsc *.tar.gz
+       rm -rf *~ *.deb *.changes ${PACKAGE}-*/ *.buildinfo *.dsc *.tar.gz
 
 .PHONY: check
 check:
@@ -50,4 +50,4 @@ install:
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster
+       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist bullseye