PACKAGE=ifupdown2 VER=2.0.0 PKGREL=1~pvetest2 SRCDIR=ifupdown2 BUILDDIR=${SRCDIR}.tmp ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) GITVERSION:=$(shell git rev-parse HEAD) DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb all: ${DEB} @echo ${DEB} .PHONY: submodule submodule: test -f "${SRCDIR}/debian/changelog" || git submodule update --init .PHONY: deb deb: ${DEB} ${DEB}: | submodule rm -f *.deb rm -rf $(BUILDDIR) mkdir $(BUILDDIR) cp -a $(SRCDIR)/* $(BUILDDIR)/ cp -R debian/* $(BUILDDIR)/debian/ cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us .PHONY: upload upload: ${DEB} tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch .PHONY: distclean distclean: clean .PHONY: clean clean: rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo .PHONY: dinstall dinstall: deb dpkg -i ${DEB}