X-Git-Url: https://git.proxmox.com/?p=proxmox-acme.git;a=blobdiff_plain;f=Makefile;h=a38da6735ab5ac909150a63446dfd8188722ebc2;hp=0a78b637b2f74b860ed775066ddd5e32e7c82eec;hb=7b8275a30d08a18257a2c3558bd824951e86ab44;hpb=92b88a9e26b874c6f0818ad83d2b7a9e16902c13 diff --git a/Makefile b/Makefile index 0a78b63..a38da67 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,36 @@ include /usr/share/dpkg/pkg-info.mk -PACKAGE=libproxmox-acme-perl +SRC=libproxmox-acme -BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} +BUILDDIR ?= ${SRC}-${DEB_VERSION_UPSTREAM} GITVERSION:=$(shell git rev-parse HEAD) -DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb -DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc +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 + +ACME_SUBMODULE="src/acme.sh" all: $(DEB) -$(BUILDDIR): src debian - rm -rf $(BUILDDIR) +.PHONY: submodule +submodule: + test -d ${ACME_SUBMODULE}/README.md || git submodule update --init --recursive - rsync -a src/ debian $(BUILDDIR) - # remove if repository exists - # echo "git clone git://git.proxmox.com/git/proxmox-acme\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE +${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: $(DEB) -$(DEB): $(BUILDDIR) - cd $(BUILDDIR); dpkg-buildpackage -b -us -uc - lintian $(DEB) +deb: ${DEBS} +${DEBS}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc + lintian ${DEBS} .PHONY: dsc dsc: ${DSC} @@ -29,13 +38,14 @@ ${DSC}: ${BUILDDIR} cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d lintian ${DSC} -dinstall: $(DEB) - dpkg -i $(DEB) +dinstall: ${DEBS} + dpkg -i ${DEBS} .PHONY: clean clean: - rm -rf $(BUILDDIR) *.deb *.buildinfo *.changes *.dsc *.tar.gz + rm -rf ${SRC}-*/ ${BUILDDIR}.tmp *.deb *.buildinfo *.changes *.dsc *.tar.?z .PHONY: upload -upload: ${DEB} - tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster --arch ${DEB_BUILD_ARCH} +upload: ${DEBS} + tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist bullseye + tar cf - ${DEB_ACME_PLUGS}|ssh -X repoman@repo.proxmox.com -- upload --product pbs --dist bullseye