+dinstall: ${DEBS}
+ dpkg -i ${DEBS}
+
+# make sure we build binaries before docs
+docs: cargo-build
+
+.PHONY: cargo-build
+cargo-build:
+ $(CARGO) build $(CARGO_BUILD_ARGS)
+
+$(COMPILED_BINS): cargo-build
+
+.PHONY: lint
+lint:
+ cargo clippy -- -A clippy::all -D clippy::correctness
+
+install: $(COMPILED_BINS)
+ install -dm755 $(DESTDIR)$(BINDIR)
+ install -dm755 $(DESTDIR)$(ZSH_COMPL_DEST)
+ $(foreach i,$(USR_BIN), \
+ install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/ ; \
+ install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;)
+ install -dm755 $(DESTDIR)$(SBINDIR)
+ $(foreach i,$(USR_SBIN), \
+ install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(SBINDIR)/ ; \
+ install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;)
+ install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup
+ $(foreach i,$(SERVICE_BIN), \
+ install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
+ $(MAKE) -C www install
+ $(MAKE) -C docs install
+
+.PHONY: upload
+upload: ${SERVER_DEB} ${CLIENT_DEB} ${DOC_DEB}
+ # check if working directory is clean
+ git diff --exit-code --stat && git diff --exit-code --stat --staged
+ tar cf - ${SERVER_DEB} ${SERVER_DBG_DEB} ${DOC_DEB} | ssh -X repoman@repo.proxmox.com upload --product pbs --dist buster
+ tar cf - ${CLIENT_DEB} ${CLIENT_DBG_DEB} | ssh -X repoman@repo.proxmox.com upload --product "pbs,pve,pmg" --dist buster