]> git.proxmox.com Git - novnc-pve.git/blame - Makefile
buildsys: write actual checked out git revision to SOURCE
[novnc-pve.git] / Makefile
CommitLineData
0fbbbb73 1PACKAGE=novnc-pve
742d9e91 2VER=0.6
dd4387ee 3PKGREL=4
0fbbbb73 4
339cafef 5SRCDIR=novnc
42e49257
DM
6
7ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
5f6ca76d
TL
8
9GITVERSION:=$(shell git rev-parse HEAD)
42e49257 10
339cafef 11DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
0fbbbb73 12
339cafef
DC
13all: ${DEB}
14 @echo ${DEB}
42e49257
DM
15
16.PHONY: deb
c3a2bb4f 17deb: ${DEB}
339cafef
DC
18${DEB}: | submodule
19 rm -rf ${SRCDIR}.tmp
20 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
1e63d713 21 cp -a debian ${SRCDIR}.tmp/
339cafef
DC
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
12de86f0 24 lintian ${DEB}
339cafef
DC
25 @echo ${DEB}
26
27.PHONY: submodule
28submodule:
29 test -f "${SRCDIR}/vnc.html" || git submodule update --init
42e49257
DM
30
31.PHONY: download
339cafef
DC
32download ${SRCDIR}:
33 git submodule foreach 'git pull --ff-only origin master'
42e49257 34
323d6cac
DM
35.PHONY: upload
36upload: ${DEB}
30b9aebb 37 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
323d6cac
DM
38
39.PHONY: distclean
40distclean: clean
41
42e49257
DM
42.PHONY: clean
43clean:
339cafef
DC
44 rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp *_all.deb *.changes *.dsc *.buildinfo
45
46.PHONY: dinstall
47dinstall: deb
48 dpkg -i ${DEB}