api viewer: rename gloabl schema variable and tell eslint about it
[proxmox-widget-toolkit.git] / Makefile
CommitLineData
63a503c9 1include /usr/share/dpkg/pkg-info.mk
d2eb74c9 2export DEB_VERSION_UPSTREAM_REVISION
63a503c9 3
ecabd437
TL
4export PACKAGE=proxmox-widget-toolkit
5BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
ed9ae47e
DC
6WT_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
7WT_DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
8DEBS=${WT_DEB} ${WT_DEV_DEB}
ecabd437 9DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
e9b7ca96 10
ecabd437 11GITVERSION:=$(shell git rev-parse HEAD)
e9b7ca96 12
f0e4870b 13${BUILDDIR}:
ecabd437
TL
14 rm -rf ${BUILDDIR} ${BUILDDIR}.tmp
15 cp -a src/ ${BUILDDIR}.tmp
16 cp -a debian ${BUILDDIR}.tmp/
17 echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE
18 mv ${BUILDDIR}.tmp/ ${BUILDDIR}
f0e4870b 19
e9b7ca96 20.PHONY: deb
ed9ae47e
DC
21deb: ${DEBS}
22${DEBS}: ${BUILDDIR}
f0e4870b 23 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
ed9ae47e 24 lintian ${DEBS}
e9b7ca96 25
f0e4870b
TL
26.PHONY: dsc
27dsc: ${DSC}
28${DSC}: ${BUILDDIR}
72bfd4bd 29 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
f0e4870b
TL
30 lintian ${DSC}
31
e9b7ca96
DM
32.PHONY: lint
33lint: ${JSSRC}
ecabd437 34 ${MAKE} -C src lint
e9b7ca96
DM
35
36.PHONY: upload
ed9ae47e
DC
37upload: ${DEBS}
38 tar cf - ${WT_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
39 tar cf - ${WT_DEV_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist buster
e9b7ca96
DM
40
41distclean: clean
e9b7ca96 42clean:
16f2ad97 43 $(MAKE) -C src clean
ecabd437 44 rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
e9b7ca96
DM
45 find . -name '*~' -exec rm {} ';'
46
47.PHONY: dinstall
ed9ae47e
DC
48dinstall: ${DEBS}
49 dpkg -i ${DEBS}