]> git.proxmox.com Git - pve-xtermjs.git/blobdiff - Makefile
buildsys: switch upload dist over to buster
[pve-xtermjs.git] / Makefile
index 865a2afbfc067626350a46611de173cfb638a21b..6e2f25cea45ace7e849499fc0ba0d1b753d4085a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,25 +8,32 @@ XTERMJSVER=3.13.2
 XTERMJSTGZ=xterm-${XTERMJSVER}.tgz
 
 SRCDIR=src
-
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
 DEB=${PACKAGE}_${VERSION}_all.deb
+DSC=${PACKAGE}_${VERSION}.dsc
 
 all: ${DEB}
        @echo ${DEB}
 
+${BUILDDIR}: ${SRCDIR} debian
+       rm -rf ${BUILDDIR}
+       rsync -a ${SRCDIR}/ debian ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
+
 .PHONY: deb
 deb: ${DEB}
-${DEB}:
-       rm -rf ${SRCDIR}.tmp
-       cp -rpa ${SRCDIR} ${SRCDIR}.tmp
-       cp -a debian ${SRCDIR}.tmp/
-       echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
-       cd ${SRCDIR}.tmp; dpkg-buildpackage -b -uc -us
+${DEB}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
        lintian ${DEB}
        @echo ${DEB}
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
+       lintian ${DSC}
 
 X_EXCLUSIONS=--exclude=addons/attach --exclude=addons/fullscreen --exclude=addons/search \
   --exclude=addons/terminado --exclude=addons/webLinks --exclude=addons/zmodem
@@ -39,14 +46,14 @@ download:
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
+       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist buster
 
 .PHONY: distclean
 distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp ${XTERMJSDIR} *_all.deb *.changes *.dsc *.buildinfo
+       rm -rf *~ debian/*~ ${PACKAGE}-*/ *.deb *.changes *.dsc *.tar.gz *.buildinfo
 
 .PHONY: dinstall
 dinstall: deb