]> git.proxmox.com Git - pve-manager.git/commitdiff
buildsys: add DSC & sbuild convenience target
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 29 May 2023 13:33:38 +0000 (15:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 29 May 2023 16:24:00 +0000 (18:24 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index c1ae57c40c2831796ef926475b871b856f7fde2f..24e9701300b326fada37b79c6e6434970a357751 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ GITVERSION:=$(shell git rev-parse --short=16 HEAD)
 
 BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
 
+DSC=$(PACKAGE)_$(DEB_VERSION).dsc
 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
 
 all: $(SUBDIRS)
@@ -37,12 +38,22 @@ $(BUILDDIR):
        echo "REPOID_GENERATED=$(GITVERSION)" > $@.tmp/debian/rules.env
        mv $@.tmp $@
 
-.PHONY: deb
+.PHONY: deb dsc
 deb: $(DEB)
 $(DEB): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
        lintian $(DEB)
 
+dsc:
+       rm -rf $(BUILDDIR) $(DSC)
+       $(MAKE) $(DSC)
+       lintian $(DSC)
+$(DSC): $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
+sbuild: $(DSC)
+       sbuild $<
+
 .PHONY: upload
 upload: $(DEB) check
        # check if working directory is clean
@@ -67,5 +78,5 @@ distclean: clean
 .PHONY: clean
 clean:
        set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
-       rm -f country.dat *.deb *.buildinfo *.changes
+       rm -f $(PACKAGE)*.tar* country.dat *.deb *.dsc *.build *.buildinfo *.changes
        rm -rf dest $(PACKAGE)-[0-9]*/