]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | export DEB_VERSION_UPSTREAM_REVISION | |
3 | ||
4 | export PACKAGE=proxmox-widget-toolkit | |
5 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} | |
6 | WT_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
7 | WT_DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
8 | DEBS=${WT_DEB} ${WT_DEV_DEB} | |
9 | DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc | |
10 | ||
11 | GITVERSION:=$(shell git rev-parse HEAD) | |
12 | ||
13 | ${BUILDDIR}: | |
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} | |
19 | ||
20 | .PHONY: deb | |
21 | deb: ${DEBS} | |
22 | ${DEBS}: ${BUILDDIR} | |
23 | cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc | |
24 | lintian ${DEBS} | |
25 | ||
26 | .PHONY: dsc | |
27 | dsc: ${DSC} | |
28 | ${DSC}: ${BUILDDIR} | |
29 | cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d | |
30 | lintian ${DSC} | |
31 | ||
32 | .PHONY: lint | |
33 | lint: ${JSSRC} | |
34 | ${MAKE} -C src lint | |
35 | ||
36 | .PHONY: upload | |
37 | upload: ${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 | |
40 | ||
41 | distclean: clean | |
42 | clean: | |
43 | $(MAKE) -C src clean | |
44 | rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo | |
45 | find . -name '*~' -exec rm {} ';' | |
46 | ||
47 | .PHONY: dinstall | |
48 | dinstall: ${DEBS} | |
49 | dpkg -i ${DEBS} |