X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=711e06f82921fab4d3c040438ddac184119a06d4;hb=339cafefa3adc6ac1d7b7056200acfbd555cd32e;hp=49c90e5afdb254d8ea7f6a61d783273d4c0e557c;hpb=3122e1833edd6693e1e2968376e9d7cc205f9752;p=novnc-pve.git diff --git a/Makefile b/Makefile index 49c90e5..711e06f 100644 --- a/Makefile +++ b/Makefile @@ -1,55 +1,51 @@ -RELEASE=3.2 - PACKAGE=novnc-pve -PKGREL=4 +VER=0.5 +PKGREL=9 -NOVNCDIR=novnc -NOVNCSRC=${NOVNCDIR}.tgz -NOVNCVER=0.4 +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}: ${TARSRC} - rm -rf ${NOVNCDIR} - tar xf ${NOVNCSRC} - mv ${NOVNCDIR}/debian ${NOVNCDIR}/debian.org - cp -a debian ${NOVNCDIR}/debian - cp pveui.js ${NOVNCDIR} +deb: ${DEB} +${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} - tar czf ${NOVNCSRC} ${NOVNCDIR} +download ${SRCDIR}: + git submodule foreach 'git pull --ff-only origin master' .PHONY: upload upload: ${DEB} - umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw - mkdir -p /pve/${RELEASE}/extra - rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb - rm -f /pve/${RELEASE}/extra/Packages* - cp ${DEB} /pve/${RELEASE}/extra - cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz - umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro + 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}