]> git.proxmox.com Git - pve-xtermjs.git/blob - Makefile
d/control: fix build-dependencies
[pve-xtermjs.git] / Makefile
1 include defines.mk
2
3 XTERMJSVER=3.12.0
4 XTERMJSTGZ=xterm-${XTERMJSVER}.tgz
5 XTERMJSDIR=package
6 XTERMDATA = ${XTERMJSDIR}/dist/
7
8 SRCDIR=src
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEB=${PACKAGE}_${VERSION}_${ARCH}.deb
14
15 all: ${DEB}
16 @echo ${DEB}
17
18 .PHONY: deb
19 deb: ${DEB}
20 ${DEB}: ${XTERMDATA}
21 rm -rf ${SRCDIR}.tmp
22 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
23 cp -a debian ${SRCDIR}.tmp/
24 cp -ar ${XTERMJSDIR}/dist/* ${SRCDIR}.tmp/www
25 echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
26 cd ${SRCDIR}.tmp; dpkg-buildpackage -b -uc -us
27 lintian ${DEB}
28 @echo ${DEB}
29
30 ${XTERMDATA}: ${XTERMJSTGZ}
31 rm -rf ${XTTERMDIR}
32 tar -xf ${XTERMJSTGZ}
33
34 .PHONY: download
35 download ${XTERMJSTGZ}:
36 wget https://registry.npmjs.org/xterm/-/${XTERMJSTGZ} -O ${XTERMJSTGZ}.tmp
37 mv ${XTERMJSTGZ}.tmp ${XTERMJSTGZ}
38
39 .PHONY: upload
40 upload: ${DEB}
41 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
42
43 .PHONY: distclean
44 distclean: clean
45
46 .PHONY: clean
47 clean:
48 rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp ${XTERMJSDIR} *_all.deb *.changes *.dsc *.buildinfo
49
50 .PHONY: dinstall
51 dinstall: deb
52 dpkg -i ${DEB}