X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=b9dc8b93a7f5c7918ee4ecae8327f375102f8d02;hb=HEAD;hp=ce8aa0afd4f6b5d33913026e1e155ce0596c2497;hpb=94791efabb14bad59a162b8e4ae1c08831392630;p=proxmox-widget-toolkit.git diff --git a/Makefile b/Makefile index ce8aa0a..47c1cf1 100644 --- a/Makefile +++ b/Makefile @@ -1,51 +1,56 @@ include /usr/share/dpkg/pkg-info.mk -export DEB_VERSION_UPSTREAM_REVISION -export PACKAGE=proxmox-widget-toolkit +PACKAGE=proxmox-widget-toolkit -DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb -DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb +DEV_DEB=$(PACKAGE)-dev_$(DEB_VERSION)_all.deb -DEBS=${DEB} ${DEV_DEB} -DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc +DEBS=$(DEB) $(DEV_DEB) +DSC=$(PACKAGE)_$(DEB_VERSION).dsc -BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} +BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) -${BUILDDIR}: GITVERSION:=$(shell git rev-parse HEAD) -${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} +$(BUILDDIR): GITVERSION:=$(shell git rev-parse HEAD) +$(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) .PHONY: deb -deb: ${DEBS} -${DEBS}: ${BUILDDIR} - cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc - lintian ${DEBS} +deb: $(DEBS) +$(DEBS): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -b -us -uc + lintian $(DEBS) .PHONY: dsc -dsc: ${DSC} -${DSC}: ${BUILDDIR} - cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d - lintian ${DSC} +dsc: $(DSC) + $(MAKE) clean + $(MAKE) $(DSC) + lintian $(DSC) + +$(DSC): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d + +sbuild: $(DSC) + sbuild $(DSC) .PHONY: lint -lint: ${JSSRC} - ${MAKE} -C src lint +lint: $(JSSRC) + $(MAKE) -C src lint .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 +upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) +upload: $(DEBS) + tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST) + tar cf - $(DEV_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist $(UPLOAD_DIST) distclean: clean clean: $(MAKE) -C src clean - rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo - find . -name '*~' -exec rm {} ';' + rm -rf $(PACKAGE)-[0-9]*/ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build .PHONY: dinstall -dinstall: ${DEBS} - dpkg -i ${DEBS} +dinstall: $(DEBS) + dpkg -i $(DEBS)