]> git.proxmox.com Git - pve-container.git/blobdiff - Makefile
fix #5414: use proper percentages in `pct df`
[pve-container.git] / Makefile
index 86ae654802d095699c2af4773cf6ba9967188f5a..cca127a52dc0355889fe8da9cca7dce748f9dbe2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,11 @@ all: $(DEB)
 dinstall: $(DEB)
        dpkg -i $(DEB)
 
-$(BUILDDIR):
-       rm -rf $(BUILDDIR)
-       rsync -a src/ debian $(BUILDDIR)
-       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+$(BUILDDIR): src debian
+       rm -rf $(BUILDDIR) $(BUILDDIR).tmp; mkdir $(BUILDDIR).tmp
+       cp -t $(BUILDDIR).tmp -a debian src/*
+       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" >$(BUILDDIR).tmp/debian/SOURCE
+       mv $(BUILDDIR).tmp $(BUILDDIR)
 
 .PHONY: deb
 deb: $(DEB)
@@ -29,18 +30,23 @@ $(DEB): $(BUILDDIR)
 .PHONY: dsc
 dsc: $(DSC)
 $(DSC): $(BUILDDIR)
-       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc
+       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
        lintian $(DSC)
 
+.PHONY: sbuild
+sbuild: $(DSC)
+       sbuild $(DSC)
+
 .PHONY: clean
 clean:
-       make -C src clean
-       rm -rf *.deb $(PACKAGE)*.tar.gz *.changes *.buildinfo $(DSC) $(PACKAGE)-*/
-       find . -name '*~' -exec rm {} ';'
+       $(MAKE) -C src clean
+       rm -rf $(PACKAGE)-[0-9]*/
+       rm -f *.deb *.changes *.build *.buildinfo *.dsc $(PACKAGE)*.tar*
 
 .PHONY: distclean
 distclean: clean
 
 .PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
 upload: $(DEB)
-       tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
+       tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST)