]> git.proxmox.com Git - iproute2.git/blob - Makefile
d/control: add missing build-depends
[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 MAIN_DEB=iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
11 OTHER_DEBS=\
12 iproute2-doc_${VERSION}-${PKGREL}_all.deb \
13 iproute2-dbgsym_${VERSION}-${PKGREL}_all.deb \
14
15 DEBS=${MAIN_DEB} ${OTHER_DEBS}
16
17 DSC=${PACKAGE}_${VER}-${PKGREL}.dsc
18
19 all: ${DEBS}
20 echo ${DEBS}
21
22 .PHONY: submodule
23 submodule:
24 test -f "${SRCDIR}/README" || git submodule update --init
25
26 ${BUILDDIR}: | submodule
27 rm -rf $(BUILDDIR)
28 cp -a $(SRCDIR) $(BUILDDIR)
29 cp -a debian $(BUILDDIR)/debian
30
31 .PHONY: deb
32 deb: ${DEBS}
33 ${OTHER_DEBS}: ${MAIN_DEBS}
34 ${MAIN_DEB}: ${BUILDDIR}
35 cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
36
37 .PHONY: dsc
38 dsc: ${DSC}
39 ${DSC}: ${BUILDDIR}
40 cd ${BUILDDIR}; tar czf ../${PACKAGE}_${VER}.orig.tar.gz *
41 cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d
42 lintian $@
43
44 .PHONY: upload
45 upload: ${DEBS}
46 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
47
48 .PHONY: clean distclean
49 distclean: clean
50 clean:
51 rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo *.orig.tar.* *.debian.tar.*
52
53 .PHONY: dinstall
54 dinstall: deb
55 dpkg -i ${DEB}