X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=9c214bcdfa8962779a19fc73ed79459e498b8e2c;hb=HEAD;hp=f672bbf564d99d1cb8b420a51bff04c0cbbc8dda;hpb=085b9535c4cbd581a277d93e2af0bc84fc2c8bac;p=proxmox-acme.git diff --git a/Makefile b/Makefile index f672bbf..9c214bc 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,14 @@ include /usr/share/dpkg/pkg-info.mk SRC=libproxmox-acme -BUILDDIR ?= ${SRC}-${DEB_VERSION_UPSTREAM} +BUILDDIR ?= $(SRC)-$(DEB_VERSION_UPSTREAM) GITVERSION:=$(shell git rev-parse HEAD) -DEB_PERL=libproxmox-acme-perl_${DEB_VERSION_UPSTREAM_REVISION}_all.deb -DEB_ACME_PLUGS=libproxmox-acme-plugins_${DEB_VERSION_UPSTREAM_REVISION}_all.deb -DEBS=${DEB_PERL} ${DEB_ACME_PLUGS} +DEB_PERL=libproxmox-acme-perl_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb +DEB_ACME_PLUGS=libproxmox-acme-plugins_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb +DEBS=$(DEB_PERL) $(DEB_ACME_PLUGS) -DSC=${SRC}_${DEB_VERSION_UPSTREAM_REVISION}.dsc +DSC=$(SRC)_$(DEB_VERSION_UPSTREAM_REVISION).dsc ACME_SUBMODULE="src/acme.sh" @@ -17,35 +17,39 @@ all: $(DEB) .PHONY: submodule submodule: - test -d ${ACME_SUBMODULE}/README.md || git submodule update --init --recursive + test -d $(ACME_SUBMODULE)/README.md || git submodule update --init --recursive -${BUILDDIR}: src debian submodule - rm -rf ${BUILDDIR}.tmp - cp -a src ${BUILDDIR}.tmp - cp -a debian ${BUILDDIR}.tmp/ - echo "git clone git://git.proxmox.com/git/proxmox-acme\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE - mv ${BUILDDIR}.tmp ${BUILDDIR} +$(BUILDDIR): src debian submodule + rm -rf $(BUILDDIR).tmp + cp -a src $(BUILDDIR).tmp + cp -a debian $(BUILDDIR).tmp/ + echo "git clone git://git.proxmox.com/git/proxmox-acme\\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) +$(DSC): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d + lintian $(DSC) -dinstall: ${DEBS} - dpkg -i ${DEBS} +sbuild: $(DSC) + sbuild $(DSC) + +dinstall: $(DEBS) + dpkg -i $(DEBS) .PHONY: clean clean: - rm -rf ${SRC}-*/ ${BUILDDIR}.tmp *.deb *.buildinfo *.changes *.dsc *.tar.?z + rm -rf $(SRC)-*/ $(BUILDDIR).tmp *.deb *.buildinfo *.build *.changes *.dsc *.tar.?z .PHONY: upload -upload: ${DEBS} - tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist bullseye --arch ${DEB_BUILD_ARCH} - tar cf - ${DEB_ACME_PLUGS}|ssh -X repoman@repo.proxmox.com -- upload --product pbs --dist bullseye --arch ${DEB_BUILD_ARCH} +upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) +upload: $(DEBS) + tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist $(UPLOAD_DIST) + tar cf - $(DEB_ACME_PLUGS)|ssh -X repoman@repo.proxmox.com -- upload --product pbs --dist $(UPLOAD_DIST)