]> git.proxmox.com Git - corosync-pve.git/blobdiff - Makefile
buildsys: fix source tarball generation directory level one-off
[corosync-pve.git] / Makefile
index 2629cb38a44fb874fd4ae8cc3a27a1504a878c48..c35b1a9e32b00ae898d5ed557884cc35a21d3825 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-include /usr/share/dpkg/pkg-info.mk
-include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/default.mk
 
 PACKAGE=corosync
 
@@ -61,7 +60,7 @@ $(MAIN_DEB): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
 
 $(ORIG_SRC_TAR): $(BUILDDIR)
-       tar czf $(ORIG_SRC_TAR) -C $(BUILDDIR) .
+       tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
 
 .PHONY: dsc
 dsc: $(DSC)
@@ -69,19 +68,22 @@ $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
        lintian $(DSC)
 
+sbuild: $(DSC)
+       sbuild $(DSC)
+
 .PHONY: submodule
 submodule:
        test -f "$(CSSRC)/INSTALL" || git submodule update --init $(CSSRC)
 
 .PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
 upload: $(DEBS)
-       tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bookworm --arch $(DEB_BUILD_ARCH)
+       tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_BUILD_ARCH)
 
 .PHONY: clean
 distclean: clean
 clean:
-       rm -rf *.deb *.changes *.dsc *.buildinfo $(BUILDDIR)
-       find . -name '*~' -exec rm () ';'
+       rm -rf *.deb *.changes *.dsc *.buildinfo *.build $(PACKAGE)-[0-9]*/ *.tar.?z
 
 .PHONY: dinstall
 dinstall: $(DEBS)