]> git.proxmox.com Git - pve-container.git/blob - Makefile
buildsys: improve clean target
[pve-container.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=pve-container
4
5 GITVERSION:=$(shell git rev-parse HEAD)
6 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
7
8 DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
9 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
10
11 all: $(DEB)
12
13 .PHONY: dinstall
14 dinstall: $(DEB)
15 dpkg -i $(DEB)
16
17 $(BUILDDIR):
18 rm -rf $(BUILDDIR)
19 rsync -a src/ debian $(BUILDDIR)
20 echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
21
22 .PHONY: deb
23 deb: $(DEB)
24 $(DEB): $(BUILDDIR)
25 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
26 lintian $(DEB)
27
28
29 .PHONY: dsc
30 dsc: $(DSC)
31 $(DSC): $(BUILDDIR)
32 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
33 lintian $(DSC)
34
35 .PHONY: sbuild
36 sbuild: $(DSC)
37 sbuild $(DSC)
38
39 .PHONY: clean
40 clean:
41 $(MAKE) -C src clean
42 rm -rf $(BUILDDIR)
43 rm -f *.deb *.changes *.buildinfo *.dsc *.tar.?z
44
45 .PHONY: distclean
46 distclean: clean
47
48 .PHONY: upload
49 upload: $(DEB)
50 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye