]> git.proxmox.com Git - pve-container.git/blobdiff - Makefile
config update: ensure that tags are unique
[pve-container.git] / Makefile
index 7f18b7c8f94cb9abfe606fbaad77c306a59420e6..b5b06b51d1f97f8dd9615622c6a376da25bdc49c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,12 @@
+include /usr/share/dpkg/pkg-info.mk
+
 PACKAGE=pve-container
-PKGVER != dpkg-parsechangelog -Sversion | cut -d- -f1
-PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2
 
 GITVERSION:=$(shell git rev-parse HEAD)
-BUILDDIR ?= build
-
-ARCH:=all
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
-DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
-DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 all: ${DEB}
 
@@ -18,14 +16,13 @@ dinstall: ${DEB}
 
 ${BUILDDIR}:
        rm -rf ${BUILDDIR}
-       rsync -a src/ ${BUILDDIR}
-       rsync -a debian ${BUILDDIR}/
-       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
+       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}: ${BUILDDIR}
-       cd build; dpkg-buildpackage -b -us -uc
+       cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
 
 
@@ -38,7 +35,7 @@ ${DSC}: ${BUILDDIR}
 .PHONY: clean
 clean:
        make -C src clean
-       rm -rf *.deb ${PACKAGE}*.tar.gz *.changes *.buildinfo ${DSC} ${BUILDDIR}
+       rm -rf *.deb ${PACKAGE}*.tar.gz *.changes *.buildinfo ${DSC} ${PACKAGE}-*/
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
@@ -46,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