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}
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}
.PHONY: install
install:
install -D -m 0744 proxmox-acme ${DESTDIR}${ACMEDIR}/proxmox-acme
- for f in ${ACME_SOURCES}; do install -D -m 0644 $$f ${DESTDIR}${ACMEDIR}/$$f; done
+ for f in ${ACME_SOURCES}; do install -D -m 0644 acme.sh/$$f ${DESTDIR}${ACMEDIR}/$$f; done
install -d -m 0755 ${DESTDIR}${PERLDIR}/PVE
install -d -m 0755 ${DESTDIR}${PERLDIR}/PVE/ACME
for f in ${LIB_SOURCES}; do install -D -m 0644 PVE/$$f ${DESTDIR}${PERLDIR}/PVE/$$f; done