]> git.proxmox.com Git - pve-qemu.git/commitdiff
buildsys: add dsc target
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 19 May 2023 11:30:23 +0000 (13:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 21 May 2023 13:50:56 +0000 (15:50 +0200)
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index 3cd6aafc555f0c0cf601daf9391b2e5d7c45ee49..6bd243b03ccd4e6cad1281d6ac5d772933dae6b4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,11 @@ PACKAGE = pve-qemu-kvm
 
 SRCDIR := qemu
 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
+ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
 
 GITVERSION := $(shell git rev-parse HEAD)
 
+DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
 DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
 DEB_DBG = ${PACKAGE}-dbg_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
 DEBS = $(DEB) $(DEB_DBG)
@@ -35,6 +37,16 @@ $(DEB): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
        lintian $(DEBS)
 
+$(ORIG_SRC_TAR): $(BUILDDIR)
+       tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
+
+.PHONY: dsc
+dsc: $(DSC)
+$(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
+       rm -f *.dsc
+       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+       lintian $(DSC)
+
 .PHONY: update
 update:
        cd $(SRCDIR) && git submodule deinit ui/keycodemapdb || true