update to submodule
[iproute2.git] / Makefile
1 PACKAGE=iproute2
2 VER=4.15.0
3 PKGREL=5
4
5 SRCDIR=iproute2
6 BUILDDIR=${SRCDIR}.tmp
7
8 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
9
10 DEBS=                                                   \
11         iproute2-doc_${VERSION}-${PKGREL}_all.deb       \
12         iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
13
14 all: ${DEBS}
15         echo ${DEBS}
16
17 .PHONY: submodule
18 submodule:
19         test -f "${SRCDIR}/README" || git submodule update --init
20
21 .PHONY: deb
22 ${DEBS} deb: | submodule
23         rm -f *.deb
24         rm -rf $(BUILDDIR)
25         mkdir $(BUILDDIR)
26         cp -a $(SRCDIR)/* $(BUILDDIR)/
27         cp -R debian $(BUILDDIR)/
28         cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
29
30 .PHONY: upload
31 upload: ${DEBS}
32         tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
33
34 .PHONY: distclean
35 distclean: clean
36
37 .PHONY: clean
38 clean:
39         rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo
40
41 .PHONY: dinstall
42 dinstall: deb
43         dpkg -i ${DEB}