]> git.proxmox.com Git - ifupdown2.git/blob - Makefile
update patch10: only rewrite config on first ifupdown2
[ifupdown2.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=ifupdown2
4
5 SRCDIR=ifupdown2
6 BUILDDIR=${SRCDIR}-${DEB_VERSION_UPSTREAM}
7
8 GITVERSION:=$(shell git rev-parse HEAD)
9
10 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
11
12 all: ${DEB}
13 @echo ${DEB}
14
15 .PHONY: submodule
16 submodule:
17 test -f "${SRCDIR}/debian/changelog" || git submodule update --init
18
19 buildir: ${BUILDDIR}
20 ${BUILDDIR}: submodule
21 rm -rf $(BUILDDIR)
22 mkdir $(BUILDDIR)
23 cp -a $(SRCDIR)/* $(BUILDDIR)/
24 cp -R debian/* $(BUILDDIR)/debian/
25
26 .PHONY: deb
27 deb: ${DEB}
28 ${DEB}: ${BUILDDIR}
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 ${PACKAGE}-*/ *.deb *.changes *.dsc *.buildinfo
41
42 .PHONY: dinstall
43 dinstall: deb
44 dpkg -i ${DEB}