X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=Makefile;h=299abbc9be608c2da93121e7db9d683e05b9a9a1;hp=c054c44d0f805440d4ce2bdf89ac7c3992bdf2fc;hb=83b0b7d185adb0aba1c36cd29999f5ad925f07eb;hpb=f943f4d13e0504498d070bf4b39130149a237f7e diff --git a/Makefile b/Makefile index c054c44..299abbc 100644 --- a/Makefile +++ b/Makefile @@ -1,42 +1,52 @@ -VERSION=5.0 -PKGREL=34 +include /usr/share/dpkg/pkg-info.mk PACKAGE=libpve-common-perl ARCH=all -GITVERSION:=$(shell git rev-parse HEAD) -DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb +BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} -all: ${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: + ${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}: - $(MAKE) -C test check - rm -rf build - rsync -a src/ build - rsync -a debian/ build/debian - echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE - cd build; dpkg-buildpackage -b -us -uc +deb: ${DEB} +${DEB}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} -.PHONY: clean -clean: - rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz *.buildinfo +.PHONY: dsc +dsc ${TARGZ}: ${DSC} +${DSC}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} -.PHONY: distclean +.PHONY: clean distclean distclean: clean +clean: + rm -rf *~ *.deb *.changes ${PACKAGE}-*/ *.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