]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
buildsys: use dpkg-dev makefile helpers for pkg info
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 22 May 2019 05:12:53 +0000 (07:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 22 May 2019 05:12:53 +0000 (07:12 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index effeca771c92e80735e85b7323de1ee3f8152511..921bd8fc8432f2e05c26044c9ec56e9000df706d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
+include /usr/share/dpkg/pkg-info.mk
+
 PACKAGE=proxmox-widget-toolkit
-PKGVER=1.0
-PKGREL=28
 
-BUILDDIR ?= ${PACKAGE}-${PKGVER}
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 GITVERSION:=$(shell git rev-parse HEAD)
 
-DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
-DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 DESTDIR=
 
@@ -82,7 +82,7 @@ lint: ${JSSRC}
 
 proxmoxlib.js: ${JSSRC}
        # add the version as comment in the file
-       echo "// ${PKGVER}-${PKGREL}" > $@.tmp
+       echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
        cat ${JSSRC} >> $@.tmp
        mv $@.tmp $@
 
@@ -95,7 +95,6 @@ upload: ${DEB}
        tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
 
 distclean: clean
-
 clean:
        rm -rf ${BUILDDIR} *.tar.gz *.dsc *.deb *.changes *.buildinfo proxmoxlib.js
        find . -name '*~' -exec rm {} ';'