]> git.proxmox.com Git - spiceterm.git/blobdiff - Makefile
bump version to 3.3.0
[spiceterm.git] / Makefile
index 471a9ae3e7f2aaa80905dfe9ae0380f43532efbf..b8b513fd4dadfc68ccf20dec6a048cd0e3dbe103 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,39 +4,45 @@ include /usr/share/dpkg/architecture.mk
 PACKAGE=spiceterm
 
 GITVERSION:=$(shell cat .git/refs/heads/master)
-BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
+BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
 
-export VERSION=$(DEB_VERSION_UPSTREAM)
+DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
 
-DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
-DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
-
-${BUILDDIR}: src/ debian/
+$(BUILDDIR): src/ debian/
        rm -rf $(BUILDDIR)
        rsync -a src/ debian $(BUILDDIR)
-       echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout ${GITVERSION}" > $(BUILDDIR)/debian/SOURCE
+       echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
 
 .PHONY: dsc
-dsc: ${DSC}
-${DSC}: $(BUILDDIR)
+dsc: clean
+       $(MAKE) $(DSC)
+       lintian $(DSC)
+
+$(DSC): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
-       lintian ${DSC}
+
+sbuild: $(DSC)
+       sbuild $<
 
 .PHONY: deb
-deb: ${DEB}
-${DEB}: $(BUILDDIR)
+deb: $(DEB)
+$(DEB): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
-       lintian ${DEB}
+       lintian $(DEB)
 
 .PHONY: dinstall
-dinstall: ${DEB}
-       dpkg -i ${DEB}
+dinstall: $(DEB)
+       dpkg -i $(DEB)
 
 .PHONY: upload
-upload: ${DEB}
-       tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
+upload: $(DEB)
+       tar cf - $(DEB) $(DBG_DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)
 
 .PHONY: distclean clean
 distclean: clean
 clean:
-       rm -rf *~ $(PACKAGE)-*/ *.deb *.changes genfont *.buildinfo *.dsc *.tar.gz
+       $(MAKE) -C src $@
+       rm -rf *~ $(PACKAGE)-*/ $(PACKAGE)*.tar* *.deb *.dsc *.changes *.build *.buildinfo