]> git.proxmox.com Git - pve-apiclient.git/blobdiff - Makefile
d/control: update standards version
[pve-apiclient.git] / Makefile
index 7401d08da273510ab459dd62ddbd2285ef9e49be..c02ba14fa87b0ec8357ec078346cdeb22d638d2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 PACKAGE=libpve-apiclient-perl
 PACKAGE=libpve-apiclient-perl
-PKGVER=2.0
-PKGREL=4
+PKGVER=$(shell dpkg-parsechangelog -Sversion | cut -d- -f1)
+PKGREL=$(shell dpkg-parsechangelog -Sversion | cut -d- -f2)
 
 BUILDSRC := $(PACKAGE)-$(PKGVER)
 DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
 
 BUILDSRC := $(PACKAGE)-$(PKGVER)
 DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
@@ -14,6 +14,7 @@ DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 PVE_COMMON_FILES=              \
        Exception.pm
 
 PVE_COMMON_FILES=              \
        Exception.pm
 
+GITVERSION:=$(shell git rev-parse HEAD)
 
 all: ${DEB}
 
 
 all: ${DEB}
 
@@ -22,6 +23,7 @@ $(BUILDSRC):
        rm -rf $(BUILDSRC)
        rsync -a debian $(BUILDSRC)
        make DESTDIR=./$(BUILDSRC) install
        rm -rf $(BUILDSRC)
        rsync -a debian $(BUILDSRC)
        make DESTDIR=./$(BUILDSRC) install
+       echo "git clone git://git.proxmox.com/git/pve-apiclient.git\\ngit checkout ${GITVERSION}" > $(BUILDSRC)/debian/SOURCE
 
 .PHONY: deb
 deb ${DEB}: $(BUILDSRC)
 
 .PHONY: deb
 deb ${DEB}: $(BUILDSRC)