]> git.proxmox.com Git - novnc-pve.git/blob - Makefile
711e06f82921fab4d3c040438ddac184119a06d4
[novnc-pve.git] / Makefile
1 PACKAGE=novnc-pve
2 VER=0.5
3 PKGREL=9
4
5 SRCDIR=novnc
6
7 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
8 GITVERSION:=$(shell cat .git/refs/heads/master)
9
10 DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
11
12 all: ${DEB}
13 @echo ${DEB}
14
15 .PHONY: deb
16 deb: ${DEB}
17 ${DEB}: | submodule
18 rm -rf ${SRCDIR}.tmp
19 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
20 cp -a debian ${SRCDIR}.tmp/debian
21 cp ${SRCDIR}.tmp/include/ui.js ${SRCDIR}.tmp/pveui.js
22 cp ${SRCDIR}.tmp/vnc.html ${SRCDIR}.tmp/index.html.tpl
23 # fix file permissions
24 chmod 0644 ${SRCDIR}.tmp/include/jsunzip.js
25 echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
26 cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
27 lintian ${DEB}
28 @echo ${DEB}
29
30 .PHONY: submodule
31 submodule:
32 test -f "${SRCDIR}/vnc.html" || git submodule update --init
33
34 .PHONY: download
35 download ${SRCDIR}:
36 git submodule foreach 'git pull --ff-only origin master'
37
38 .PHONY: upload
39 upload: ${DEB}
40 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
41
42 .PHONY: distclean
43 distclean: clean
44
45 .PHONY: clean
46 clean:
47 rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp *_all.deb *.changes *.dsc *.buildinfo
48
49 .PHONY: dinstall
50 dinstall: deb
51 dpkg -i ${DEB}