buildsys: use dpkg-dev makefile helpers for pkg info
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Jul 2019 07:32:29 +0000 (09:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Jul 2019 07:32:29 +0000 (09:32 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index 1b3a3ad..7ea60be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,14 @@
-VERSION=6.0
-PKGREL=2
+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