]> git.proxmox.com Git - novnc-pve.git/blobdiff - Makefile
bump version to 0.6-4
[novnc-pve.git] / Makefile
index 9ddde443ca5c578fb28ae663c859308639d571cc..70d192556f956c0acb63f9dcb471390e652ff357 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,51 +1,47 @@
-RELEASE=4.2
-
 PACKAGE=novnc-pve
-PKGREL=8
+VER=0.6
+PKGREL=4
 
-NOVNCDIR=novnc
-NOVNCSRC=${NOVNCDIR}.tgz
-NOVNCVER=0.5
+SRCDIR=novnc
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
-DEB=${PACKAGE}_${NOVNCVER}-${PKGREL}_${ARCH}.deb
-
-all: deb
+DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
 
-.PHONY: dinstall
-dinstall: deb
-       dpkg -i ${DEB}
+all: ${DEB}
+       @echo ${DEB}
 
 .PHONY: deb
 deb: ${DEB}
-${DEB}: ${TARSRC}
-       rm -rf ${NOVNCDIR}
-       tar xf ${NOVNCSRC}
-       cp -a debian ${NOVNCDIR}/debian
-       cp ${NOVNCDIR}/include/ui.js ${NOVNCDIR}/pveui.js
-       cp ${NOVNCDIR}/vnc.html ${NOVNCDIR}/index.html.tpl
-       # fix file permissions
-       chmod 0644 ${NOVNCDIR}/include/jsunzip.js
-       echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${NOVNCDIR}/debian/SOURCE
-       cd ${NOVNCDIR}; dpkg-buildpackage -b -uc -us
+${DEB}: | submodule
+       rm -rf ${SRCDIR}.tmp
+       cp -rpa ${SRCDIR} ${SRCDIR}.tmp
+       cp -a debian ${SRCDIR}.tmp/
+       echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
+       cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
        lintian ${DEB}
+       @echo ${DEB}
+
+.PHONY: submodule
+submodule:
+       test -f "${SRCDIR}/vnc.html" || git submodule update --init
 
 .PHONY: download
-download:
-       rm -rf ${NOVNCDIR}
-       git clone git://github.com/kanaka/noVNC ${NOVNCDIR}
-       cd ${NOVNCDIR}; git checkout -b local a0e7ab43dca0ce11a713694ee4cf530bd3b17c5a
-       tar czf ${NOVNCSRC} ${NOVNCDIR}
+download ${SRCDIR}:
+       git submodule foreach 'git pull --ff-only origin master'
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB}|ssh repoman@repo.proxmox.com upload
+       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
 
 .PHONY: distclean
 distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf *~ debian/*~ *_${ARCH}.deb *_all.deb *.changes *.dsc novnc 
+       rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp *_all.deb *.changes *.dsc *.buildinfo
+
+.PHONY: dinstall
+dinstall: deb
+       dpkg -i ${DEB}