d/control: change metadata
[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-dbgsym_${VERSION}-${PKGREL}_all.deb    \
13         iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
14
15 all: ${DEBS}
16         echo ${DEBS}
17
18 .PHONY: submodule
19 submodule:
20         test -f "${SRCDIR}/README" || git submodule update --init
21
22 .PHONY: deb
23 ${DEBS} deb: | submodule
24         rm -rf $(BUILDDIR)
25         cp -a $(SRCDIR) $(BUILDDIR)
26         cp -a debian $(BUILDDIR)/debian
27         cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
28
29 .PHONY: upload
30 upload: ${DEBS}
31         tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
32
33 .PHONY: clean distclean
34 distclean: clean
35 clean:
36         rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo
37
38 .PHONY: dinstall
39 dinstall: deb
40         dpkg -i ${DEB}