]> git.proxmox.com Git - pve-xtermjs.git/blame_incremental - Makefile
buildsys: use dpkg-dev makefile helpers for pkg info
[pve-xtermjs.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=pve-xtermjs
4
5export VERSION=${DEB_VERSION_UPSTREAM_REVISION}
6
7XTERMJSVER=3.12.0
8XTERMJSTGZ=xterm-${XTERMJSVER}.tgz
9XTERMJSDIR=package
10XTERMDATA = ${XTERMJSDIR}/dist/
11
12SRCDIR=src
13
14GITVERSION:=$(shell cat .git/refs/heads/master)
15
16DEB=${PACKAGE}_${VERSION}_all.deb
17
18all: ${DEB}
19 @echo ${DEB}
20
21.PHONY: deb
22deb: ${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
38download ${XTERMJSTGZ}:
39 wget https://registry.npmjs.org/xterm/-/${XTERMJSTGZ} -O ${XTERMJSTGZ}.tmp
40 mv ${XTERMJSTGZ}.tmp ${XTERMJSTGZ}
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:
51 rm -rf *~ debian/*~ *_${ARCH}.deb ${SRCDIR}.tmp ${XTERMJSDIR} *_all.deb *.changes *.dsc *.buildinfo
52
53.PHONY: dinstall
54dinstall: deb
55 dpkg -i ${DEB}