X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=fed06409f7acc52cebd9a8b6cfbca22a71a46fa1;hb=341d3078b34c08dc0d66a2c0215f2a598a05fcb6;hp=19a040429d6b140f938fab982081c904191929a2;hpb=a3fe0ccfab15d74e77cc463bca3fdb9b7fa537b8;p=pve-container.git diff --git a/Makefile b/Makefile index 19a0404..fed0640 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ -VERSION=1.0 -PACKAGE=pve-container -PKGREL=94 +include /usr/share/dpkg/pkg-info.mk -GITVERSION:=$(shell cat .git/refs/heads/master) +PACKAGE=pve-container -ARCH:=all +GITVERSION:=$(shell git rev-parse HEAD) +BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} -DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc all: ${DEB} @@ -14,21 +14,28 @@ all: ${DEB} dinstall: ${DEB} dpkg -i ${DEB} +${BUILDDIR}: + rm -rf ${BUILDDIR} + rsync -a src/ debian ${BUILDDIR} + echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout ${GITVERSION}" > $(BUILDDIR)/debian/SOURCE + .PHONY: deb deb: ${DEB} -${DEB}: - rm -rf build - mkdir build - rsync -a src/ build - rsync -a debian/ build/debian - echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout ${GITVERSION}" > build/debian/SOURCE - cd build; dpkg-buildpackage -rfakeroot -b -us -uc +${DEB}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} + +.PHONY: dsc +dsc: ${DSC} +${DSC}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} + .PHONY: clean clean: make -C src clean - rm -rf build *.deb ${PACKAGE}-*.tar.gz *.changes + rm -rf *.deb ${PACKAGE}*.tar.gz *.changes *.buildinfo ${DSC} ${PACKAGE}-*/ find . -name '*~' -exec rm {} ';' .PHONY: distclean @@ -36,4 +43,4 @@ distclean: clean .PHONY: upload upload: ${DEB} - tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload + tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster