X-Git-Url: https://git.proxmox.com/?p=pve-edk2-firmware.git;a=blobdiff_plain;f=Makefile;h=b65390e9790aee9f8664de639353229402210e1a;hp=d24eacc24b2ff754e16482ec2923f0427338a5a7;hb=975e647cf9b06b4401e6e35a13a12a857394ffa6;hpb=33bf0acc91472ec5e30e692b35fd16a16b5e10d3 diff --git a/Makefile b/Makefile index d24eacc..b65390e 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,42 @@ +include /usr/share/dpkg/pkg-info.mk + PACKAGE=pve-edk2-firmware -# version and package release is controlled over d/changelog -VER=$(shell dpkg-parsechangelog -S version) SRCDIR=edk2 -BUILDDIR=${SRCDIR}.build +BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} GITVERSION:=$(shell git rev-parse HEAD) -DEB=${PACKAGE}_${VER}_all.deb +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc all: ${DEB} @echo ${DEB} -.PHONY: deb -deb: ${DEB} -${DEB}: | submodule +${BUILDDIR}: ${SRCDIR}/Readme.md rm -rf ${BUILDDIR} cp -rpa ${SRCDIR} ${BUILDDIR} cp -a debian ${BUILDDIR} echo "git clone git://git.proxmox.com/git/pve-edk2-firmware.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE + +.PHONY: deb +deb: ${DEB} +${DEB}: ${BUILDDIR} cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us lintian ${DEB} @echo ${DEB} +.PHONY: dsc +dsc: ${DSC} +${DSC}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d + lintian ${DSC} + .PHONY: submodule submodule: - test -f "${SRCDIR}/Readme.md" || git submodule update --init + git submodule update --init --recursive + +${SRCDIR}/Readme.md: submodule .PHONY: update_modules update_modules: submodule @@ -33,14 +44,12 @@ update_modules: submodule .PHONY: upload upload: ${DEB} - tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch + tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster -.PHONY: distclean +.PHONY: distclean clean distclean: clean - -.PHONY: clean clean: - rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo + rm -rf *~ debian/*~ *.deb ${PACKAGE}-*/ *.tar.gz *.changes *.dsc *.buildinfo .PHONY: dinstall dinstall: ${DEB}