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