include /usr/share/dpkg/pkg-info.mk PACKAGE=ifupdown SRCDIR=src UPSTREAM=https://salsa.debian.org/debian/ifupdown.git BUILDDIR=$(SRCDIR)-$(DEB_VERSION_UPSTREAM) DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb all: $(DEB) @echo $(DEB) .PHONY: update-subtree deb upload distclean clean dinstall update-subtree: git subtree fetch $(UPSTREAM) master @printf "\nSubtree fetched, to merge in changes use something like:\n\n"\ "\tgit subtree pull -P src --squash $(UPSTREAM) master\n" buildir: $(BUILDDIR) $(BUILDDIR): rm -rf $(BUILDDIR) $(BUILDDIR).tmp cp -a $(SRCDIR)/ $(BUILDDIR).tmp mv $(BUILDDIR).tmp $(BUILDDIR) deb: $(DEB) $(DEB): $(BUILDDIR) cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -uc -us upload: $(DEB) tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye distclean: clean clean: rm -rf $(SRCDIR)-*/ *.deb *.changes *.dsc *.buildinfo dinstall: deb dpkg -i $(DEB)