]> git.proxmox.com Git - pve-container.git/blobdiff - Makefile
bump version to 4.4-1
[pve-container.git] / Makefile
index c88db458cd58b6dbd4bc61bf70cfbd8ba3028485..b5b06b51d1f97f8dd9615622c6a376da25bdc49c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
-VERSION=2.0
+include /usr/share/dpkg/pkg-info.mk
+
 PACKAGE=pve-container
-PKGREL=28
 
 GITVERSION:=$(shell git rev-parse HEAD)
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
-ARCH:=all
-
-DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 all: ${DEB}
 
@@ -14,21 +14,28 @@ all: ${DEB}
 dinstall: ${DEB}
        dpkg -i ${DEB}
 
+${BUILDDIR}:
+       rm -rf ${BUILDDIR}
+       rsync -a src/ debian ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout ${GITVERSION}" > $(BUILDDIR)/debian/SOURCE
+
 .PHONY: deb
 deb: ${DEB}
-${DEB}:
-       rm -rf build
-       mkdir build
-       rsync -a src/ build
-       rsync -a debian/ build/debian
-       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
-       cd build; dpkg-buildpackage -b -us -uc
+${DEB}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
 
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
+       lintian ${DSC}
+
 .PHONY: clean
 clean:
        make -C src clean
-       rm -rf build *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
+       rm -rf *.deb ${PACKAGE}*.tar.gz *.changes *.buildinfo ${DSC} ${PACKAGE}-*/
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
@@ -36,4 +43,4 @@ distclean: clean
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
+       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye