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