]> git.proxmox.com Git - qemu-server.git/blobdiff - Makefile
vzdump: followup: log total dirtiness again, minor output adaptions
[qemu-server.git] / Makefile
index 2e3d4e1ac0eaf874b49d8f9f51986b37a8080aaf..457eaef4df57215619bc361d5a3832443fe510c8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ include /usr/share/dpkg/pkg-info.mk
 include /usr/share/dpkg/architecture.mk
 
 PACKAGE=qemu-server
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
 DESTDIR=
 PREFIX=/usr
@@ -20,6 +21,7 @@ GITVERSION:=$(shell git rev-parse HEAD)
 
 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
 DBG_DEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 DEBS=${DEB} ${DBG_DEB}
 
@@ -50,7 +52,7 @@ qmrestore.zsh-completion:
        mv $@.tmp $@
 
 PKGSOURCES=qm qm.1 qmrestore qmrestore.1 qmextract qm.conf.5 qm.bash-completion qmrestore.bash-completion \
-           qm.zsh-completion qmrestore.zsh-completion
+           qm.zsh-completion qmrestore.zsh-completion cpu-models.conf.5
 
 .PHONY: install
 install: ${PKGSOURCES}
@@ -74,19 +76,28 @@ install: ${PKGSOURCES}
        install -m 0755 qmextract ${DESTDIR}${LIBDIR}
        install -m 0644 qm.1 ${DESTDIR}/${MAN1DIR}
        install -m 0644 qmrestore.1 ${DESTDIR}/${MAN1DIR}
+       install -m 0644 cpu-models.conf.5 ${DESTDIR}/${MAN5DIR}
        install -m 0644 qm.conf.5 ${DESTDIR}/${MAN5DIR}
        cd ${DESTDIR}/${MAN5DIR}; ln -s -f qm.conf.5.gz vm.conf.5.gz
 
+${BUILDDIR}:
+       rm -rf $(BUILDDIR)
+       rsync -a * $(BUILDDIR)
+       echo "git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+
 .PHONY: deb
 deb: ${DEBS}
 ${DBG_DEB}: ${DEB}
-${DEB}:
-       rm -rf build
-       rsync -a * build
-       echo "git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
-       cd build; dpkg-buildpackage -b -us -uc
+${DEB}: $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
        lintian ${DEBS}
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
+       lintian ${DSC}
+
 .PHONY: test
 test:
        PVE_GENERATING_DOCS=1 perl -I. ./qm verifyapi
@@ -94,12 +105,12 @@ test:
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist buster
+       tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com upload --product pve --dist buster
 
 .PHONY: clean
 clean:
+       rm -rf $(PACKAGE)-*/ *.deb *.buildinfo *.changes *.dsc $(PACKAGE)_*.tar.gz
        $(MAKE) cleanup-docgen
-       rm -rf build *.deb *.buildinfo *.changes
        find . -name '*~' -exec rm {} ';'