From 51419183e1ff674ef6050bfe7f2fabc5d1ef810e Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 15 Jun 2018 01:52:01 +0200 Subject: [PATCH] add makefile --- Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..142b44e --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +PACKAGE=ifupdown2 +VER=1.1 +PKGREL=cl3u18 + +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) + cp -rpa ${SRCDIR} ${BUILDDIR} + cp -a debian ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us + +#.PHONY: download +#download ${SRCDIR}: +# git submodule foreach 'git pull --ff-only origin master' + +.PHONY: upload +upload: ${DEB} + tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch + +.PHONY: distclean +distclean: clean + +.PHONY: clean +clean: + rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo + +.PHONY: dinstall +dinstall: deb + dpkg -i ${DEB} -- 2.39.2