]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - Makefile
cleanly separate sources from package build, move to own folder
[proxmox-widget-toolkit.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 export PACKAGE=proxmox-widget-toolkit
4 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
5 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
6 DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
7
8 GITVERSION:=$(shell git rev-parse HEAD)
9
10 ${BUILDDIR}:
11 rm -rf ${BUILDDIR} ${BUILDDIR}.tmp
12 cp -a src/ ${BUILDDIR}.tmp
13 cp -a debian ${BUILDDIR}.tmp/
14 echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE
15 mv ${BUILDDIR}.tmp/ ${BUILDDIR}
16
17 .PHONY: deb
18 deb: ${DEB}
19 ${DEB}: ${BUILDDIR}
20 cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
21 lintian ${DEB}
22
23 .PHONY: dsc
24 dsc: ${DSC}
25 ${DSC}: ${BUILDDIR}
26 cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
27 lintian ${DSC}
28
29 .PHONY: lint
30 lint: ${JSSRC}
31 ${MAKE} -C src lint
32
33 .PHONY: upload
34 upload: ${DEB}
35 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
36
37 distclean: clean
38 clean:
39 rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
40 find . -name '*~' -exec rm {} ';'
41
42 .PHONY: dinstall
43 dinstall: ${DEB}
44 dpkg -i ${DEB}