]> git.proxmox.com Git - libjs-qrcodejs.git/commitdiff
buildsys: fix source tarball generation and add sbuild target
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 25 May 2023 09:23:31 +0000 (11:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 25 May 2023 10:58:17 +0000 (12:58 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index 6cbb2b095d884f38b153a436a710a232472ba6f9..abdc6a0df7d907e84f3a9d290eeae7d17883a4b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,9 @@ $(BUILDDIR):
        echo "git clone git://git.proxmox.com/git/libjs-qrcodejs.git\\ngit checkout $(GITVERSION)" >  $(BUILDDIR).tmp/debian/SOURCE
        mv $(BUILDDIR).tmp/ $(BUILDDIR)
 
+$(ORIG_SRC_TAR): $(BUILDDIR)
+       tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
+
 .PHONY: deb
 deb: $(DEB)
 $(DEB): $(BUILDDIR)
@@ -27,19 +30,20 @@ $(DEB): $(BUILDDIR)
 
 .PHONY: dsc
 dsc: $(DSC)
-$(DSC): $(BUILDDIR)
-       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+       $(MAKE) clean
+       $(MAKE) $(DSC)
        lintian $(DSC)
 
+$(DSC): $(BUILDDIR) $(ORIG_SRC_TAR)
+       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
 .PHONY: upload
 upload: $(DEB)
        tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
 
 distclean: clean
 clean:
-       $(MAKE) -C src clean
-       rm -rf $(BUILDDIR) $(BUILDDIR).tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
-       find . -name '*~' -exec rm {} ';'
+       rm -rf $(PACKAGE)-[0-9]*/ $(PACKAGE)*tar* *.dsc *.deb *.changes *.build *.buildinfo
 
 .PHONY: dinstall
 dinstall: $(DEB)