X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=Makefile;h=7ea60be18837ac9dcfbfbe1e33edb64af8fa6490;hp=2701be6cfb500158d88c92d33af3b99ebf6cc325;hb=79ac628b9e567ffbc881399ea63e7590ffaf1f8f;hpb=b2285cf8ebf9f8943e75d6db9f4ab1019e4156d5 diff --git a/Makefile b/Makefile index 2701be6..7ea60be 100644 --- a/Makefile +++ b/Makefile @@ -1,41 +1,52 @@ -VERSION=5.0 -PKGREL=35 +include /usr/share/dpkg/pkg-info.mk PACKAGE=libpve-common-perl ARCH=all -GITVERSION:=$(shell git rev-parse HEAD) -BUILDDIR ?= build +BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} -DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb +DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc +TARGZ=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.tar.gz -all: ${DEB} +all: + ${MAKE} -C src .PHONY: dinstall dinstall: deb dpkg -i ${DEB} +${BUILDDIR}: src debian + rm -rf ${BUILDDIR} + rsync -a * ${BUILDDIR} + echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout $(shell git rev-parse HEAD)" > ${BUILDDIR}/debian/SOURCE .PHONY: deb -deb ${DEB}: check - rm -rf ${BUILDDIR} - rsync -a src/ ${BUILDDIR} - rsync -a debian/ ${BUILDDIR}/debian - echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE +deb: ${DEB} +${DEB}: ${BUILDDIR} cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} +.PHONY: dsc +dsc ${TARGZ}: ${DSC} +${DSC}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} + .PHONY: clean distclean distclean: clean clean: - rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo + rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo *.dsc *.tar.gz .PHONY: check check: $(MAKE) -C test check +.PHONY: install +install: + ${MAKE} -C src install + .PHONY: upload upload: ${DEB} - tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch - + tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster