]> git.proxmox.com Git - novnc-pve.git/blobdiff - Makefile
bump version to 1.4.0-1
[novnc-pve.git] / Makefile
index 1d6ff76f4f6f60a6ddfb5e201c3b81bb7671fffa..9591e35af2c43c8abd550ad224e559650ba6e718 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,56 @@
-RELEASE=3.2
+include /usr/share/dpkg/pkg-info.mk
 
-NOVNCDIR=novnc
-NOVNCSRC=${NOVNCDIR}.tgz
+PACKAGE=novnc-pve
 
-ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+SRCDIR=novnc
+BUILDDIR=${SRCDIR}.tmp
 
-all: deb
+GITVERSION:=$(shell git rev-parse HEAD)
 
-.PHONY: dinstall
-dinstall: deb
-       dpkg -i ${DEB}
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+
+all:
+
+${SRCDIR}/vnc.html: submodule
+${BUILDDIR}: $(SRCDIR)/vnc.html
+       rm -rf ${BUILDDIR}
+       cp -rpa ${SRCDIR} ${BUILDDIR}
+       cp -a debian ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
 
 .PHONY: deb
-deb ${DEB}: ${TARSRC}
-       rm -rf ${NOVNCDIR}
-       tar xf ${NOVNCSRC}
-       cd ${NOVNCDIR}; dpkg-buildpackage -b -uc -us
+deb: ${DEB}
+${DEB}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
+       lintian ${DEB}
+       @echo ${DEB}
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d
+       lintian ${DSC}
+
+.PHONY: submodule
+submodule:
+       test -f "${SRCDIR}/package.json" || git submodule update --init
 
 .PHONY: download
-download:
-       rm -rf ${NOVNCDIR}
-       git clone git://github.com/kanaka/noVNC ${NOVNCDIR}
-       tar czf ${NOVNCSRC} ${NOVNCDIR}
+download ${SRCDIR}:
+       git submodule foreach 'git pull --ff-only origin master'
+
+.PHONY: upload
+upload: ${DEB}
+       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist bullseye
+
+.PHONY: distclean
+distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf *~ *_${ARCH}.deb *_all.deb *.changes *.dsc novnc 
+       rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo ${PACKAGE}*.tar.gz
+
+.PHONY: dinstall
+dinstall: deb
+       dpkg -i ${DEB}