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