]> git.proxmox.com Git - iproute2.git/blobdiff - Makefile
update to submodule
[iproute2.git] / Makefile
index e043d81408e21989eecc3fbcf0348db31851d380..82e80fab6910d6682b955a14bb244312608c6fcb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
-VERSION=4.15.0
-PKGREL=4
+PACKAGE=iproute2
+VER=4.15.0
+PKGREL=5
 
-DIR=iproute2-${VERSION}
-SRC=iproute2-${VERSION}.orig.tar.xz
+SRCDIR=iproute2
+BUILDDIR=${SRCDIR}.tmp
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
@@ -13,27 +14,30 @@ DEBS=                                                       \
 all: ${DEBS}
        echo ${DEBS}
 
-.PHONY: deb
-${DEBS} deb: ${SRC}
-       rm -rf ${DIR}
-       tar xf ${SRC} 
-       cp -a debian ${DIR}/debian
-       cd ${DIR}; dpkg-buildpackage -rfakeroot -b -us -uc
-
+.PHONY: submodule
+submodule:
+       test -f "${SRCDIR}/README" || git submodule update --init
 
-download:
-       rm -rf iproute2-${VERSION} $(SRC)
-       git clone -b v${VERSION} --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git iproute2-${VERSION}
-       tar cJf $(SRC) iproute2-${VERSION}/
+.PHONY: deb
+${DEBS} deb: | submodule
+       rm -f *.deb
+       rm -rf $(BUILDDIR)
+       mkdir $(BUILDDIR)
+       cp -a $(SRCDIR)/* $(BUILDDIR)/
+       cp -R debian $(BUILDDIR)/
+       cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
 
 .PHONY: upload
 upload: ${DEBS}
        tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
 
+.PHONY: distclean
+distclean: clean
+
 .PHONY: clean
 clean:
-       rm -rf *~ debian/*~ *.changes *.dsc ${DIR} *.deb *.buildinfo
+       rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo
 
 .PHONY: dinstall
-dinstall: ${DEBS}
-       dpkg -i ${DEBS}
+dinstall: deb
+       dpkg -i ${DEB}