]> git.proxmox.com Git - pve-xtermjs.git/blame - Makefile
buildsys: use dpkg-dev makefile helpers for pkg info
[pve-xtermjs.git] / Makefile
CommitLineData
dcefe98b
TL
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=pve-xtermjs
4
5export VERSION=${DEB_VERSION_UPSTREAM_REVISION}
dcf3d43b 6
1dd2d533 7XTERMJSVER=3.12.0
5e8b8730
DC
8XTERMJSTGZ=xterm-${XTERMJSVER}.tgz
9XTERMJSDIR=package
10XTERMDATA = ${XTERMJSDIR}/dist/
11
dcf3d43b
DC
12SRCDIR=src
13
dcf3d43b
DC
14GITVERSION:=$(shell cat .git/refs/heads/master)
15
dcefe98b 16DEB=${PACKAGE}_${VERSION}_all.deb
dcf3d43b
DC
17
18all: ${DEB}
19 @echo ${DEB}
20
21.PHONY: deb
22deb: ${DEB}
5e8b8730 23${DEB}: ${XTERMDATA}
dcf3d43b
DC
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
82fddbd9 29 cd ${SRCDIR}.tmp; dpkg-buildpackage -b -uc -us
dcf3d43b
DC
30 lintian ${DEB}
31 @echo ${DEB}
32
5e8b8730
DC
33${XTERMDATA}: ${XTERMJSTGZ}
34 rm -rf ${XTTERMDIR}
35 tar -xf ${XTERMJSTGZ}
dcf3d43b
DC
36
37.PHONY: download
60ff38b2 38download ${XTERMJSTGZ}:
5e8b8730
DC
39 wget https://registry.npmjs.org/xterm/-/${XTERMJSTGZ} -O ${XTERMJSTGZ}.tmp
40 mv ${XTERMJSTGZ}.tmp ${XTERMJSTGZ}
dcf3d43b
DC
41
42.PHONY: upload
43upload: ${DEB}
44 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
45
46.PHONY: distclean
47distclean: clean
48
49.PHONY: clean
50clean:
5e8b8730 51 rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp ${XTERMJSDIR} *_all.deb *.changes *.dsc *.buildinfo
dcf3d43b
DC
52
53.PHONY: dinstall
54dinstall: deb
55 dpkg -i ${DEB}