]> git.proxmox.com Git - ifupdown2.git/blob - Makefile
patch: patch5: fix code nit
[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,pmg,pbs --dist bullseye
34
35 .PHONY: distclean clean
36 distclean: clean
37 clean:
38 rm -rf $(PACKAGE)-*/ *.deb *.changes *.dsc *.buildinfo
39
40 .PHONY: dinstall
41 dinstall: deb
42 dpkg -i $(DEB)