proxmox-widget-toolkit/Makefile

50 lines
1.4 KiB
Makefile
Raw Normal View History

include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM_REVISION
export PACKAGE=proxmox-widget-toolkit
BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
WT_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
WT_DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
DEBS=${WT_DEB} ${WT_DEV_DEB}
DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
2017-01-30 11:57:12 +03:00
GITVERSION:=$(shell git rev-parse HEAD)
2017-01-30 11:57:12 +03:00
${BUILDDIR}:
rm -rf ${BUILDDIR} ${BUILDDIR}.tmp
cp -a src/ ${BUILDDIR}.tmp
cp -a debian ${BUILDDIR}.tmp/
echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE
mv ${BUILDDIR}.tmp/ ${BUILDDIR}
2017-01-30 11:57:12 +03:00
.PHONY: deb
deb: ${DEBS}
${DEBS}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
lintian ${DEBS}
2017-01-30 11:57:12 +03:00
.PHONY: dsc
dsc: ${DSC}
${DSC}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
lintian ${DSC}
2017-01-30 11:57:12 +03:00
.PHONY: lint
lint: ${JSSRC}
${MAKE} -C src lint
2017-01-30 11:57:12 +03:00
.PHONY: upload
upload: ${DEBS}
tar cf - ${WT_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
tar cf - ${WT_DEV_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist buster
2017-01-30 11:57:12 +03:00
distclean: clean
clean:
$(MAKE) -C src clean
rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
2017-01-30 11:57:12 +03:00
find . -name '*~' -exec rm {} ';'
.PHONY: dinstall
dinstall: ${DEBS}
dpkg -i ${DEBS}