]> git.proxmox.com Git - novnc-pve.git/commitdiff
change from tgz to submodule
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 22 May 2017 14:58:10 +0000 (16:58 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 24 May 2017 11:00:39 +0000 (13:00 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
.gitmodules [new file with mode: 0644]
Makefile
novnc [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..9c0649a
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "novnc"]
+       path = novnc
+       url = ../mirror_novnc
index cbd7ccbf4dbf7ca825377b10989192b9115568e3..711e06f82921fab4d3c040438ddac184119a06d4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,39 @@
 PACKAGE=novnc-pve
+VER=0.5
 PKGREL=9
 
-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
+DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
 
-all: 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
+${DEB}: | submodule
+       rm -rf ${SRCDIR}.tmp
+       cp -rpa ${SRCDIR} ${SRCDIR}.tmp
+       cp -a debian ${SRCDIR}.tmp/debian
+       cp ${SRCDIR}.tmp/include/ui.js ${SRCDIR}.tmp/pveui.js
+       cp ${SRCDIR}.tmp/vnc.html ${SRCDIR}.tmp/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
+       chmod 0644 ${SRCDIR}.tmp/include/jsunzip.js
+       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}
@@ -46,4 +44,8 @@ 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}
diff --git a/novnc b/novnc
new file mode 160000 (submodule)
index 0000000..a0e7ab4
--- /dev/null
+++ b/novnc
@@ -0,0 +1 @@
+Subproject commit a0e7ab43dca0ce11a713694ee4cf530bd3b17c5a