X-Git-Url: https://git.proxmox.com/?p=proxmox-acme.git;a=blobdiff_plain;f=Makefile;h=1d487cbb20b1c4d6bce2025d0e8f442b65e3a9f6;hp=9d2655a5e2c3793acf07ca17b94048d4931b860c;hb=9bd9d7a72e1ac651c71a2c84dd83073fbe6246fa;hpb=c0c6720a65794601598e2118eaeeeccf2919e36a diff --git a/Makefile b/Makefile index 9d2655a..1d487cb 100644 --- a/Makefile +++ b/Makefile @@ -8,26 +8,26 @@ GITVERSION:=$(shell git rev-parse HEAD) DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc -DNSAPI="acme.sh/dnsapi" +ACME_SUBMODULE="src/acme.sh" all: $(DEB) .PHONY: submodule submodule: - test -d $(DNSAPI) || git submodule update --init --recursive + test -d ${ACME_SUBMODULE}/README.md || git submodule update --init --recursive -$(BUILDDIR): src debian submodule - rm -rf $(BUILDDIR) - rsync -a src/ debian $(BUILDDIR) - rsync -a $(DNSAPI) $(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: ${DEB} +${DEB}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc + lintian ${DEB} .PHONY: dsc dsc: ${DSC} @@ -35,12 +35,12 @@ ${DSC}: ${BUILDDIR} cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d lintian ${DSC} -dinstall: $(DEB) - dpkg -i $(DEB) +dinstall: ${DEB} + dpkg -i ${DEB} .PHONY: clean clean: - rm -rf $(BUILDDIR) *.deb *.buildinfo *.changes *.dsc *.tar.gz + rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.deb *.buildinfo *.changes *.dsc *.tar.gz .PHONY: upload upload: ${DEB}