]> git.proxmox.com Git - pve-xtermjs.git/blob - Makefile
d/control: fix build-dependencies
[pve-xtermjs.git] / Makefile
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.13.2
8 XTERMJSTGZ=xterm-${XTERMJSVER}.tgz
9
10 SRCDIR=src
11 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
12 GITVERSION:=$(shell git rev-parse HEAD)
13
14 DEB=${PACKAGE}_${VERSION}_all.deb
15 DSC=${PACKAGE}_${VERSION}.dsc
16
17 all: ${DEB}
18 @echo ${DEB}
19
20 ${BUILDDIR}: ${SRCDIR} debian
21 rm -rf ${BUILDDIR}
22 rsync -a ${SRCDIR}/ debian ${BUILDDIR}
23 echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
24
25 .PHONY: deb
26 deb: ${DEB}
27 ${DEB}: ${BUILDDIR}
28 cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
29 lintian ${DEB}
30 @echo ${DEB}
31
32 .PHONY: dsc
33 dsc: ${DSC}
34 ${DSC}: ${BUILDDIR}
35 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
36 lintian ${DSC}
37
38 X_EXCLUSIONS=--exclude=addons/attach --exclude=addons/fullscreen --exclude=addons/search \
39 --exclude=addons/terminado --exclude=addons/webLinks --exclude=addons/zmodem
40 .PHONY: download
41 download:
42 wget https://registry.npmjs.org/xterm/-/${XTERMJSTGZ} -O ${XTERMJSTGZ}.tmp
43 mv ${XTERMJSTGZ}.tmp ${XTERMJSTGZ}
44 tar -C $(SRCDIR)/www -xf ${XTERMJSTGZ} package/dist --strip-components=2 ${X_EXCLUSIONS}
45 rm ${XTERMJSTGZ}
46
47 .PHONY: upload
48 upload: ${DEB}
49 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist buster
50
51 .PHONY: distclean
52 distclean: clean
53
54 .PHONY: clean
55 clean:
56 rm -rf *~ debian/*~ ${PACKAGE}-*/ *.deb *.changes *.dsc *.tar.gz *.buildinfo
57
58 .PHONY: dinstall
59 dinstall: deb
60 dpkg -i ${DEB}