]> git.proxmox.com Git - novnc-pve.git/blob - Makefile
buildsys: expand clean target
[novnc-pve.git] / Makefile
1 include /usr/share/dpkg/default.mk
2
3 PACKAGE=novnc-pve
4
5 SRCDIR=novnc
6 BUILDDIR=$(SRCDIR).tmp
7 ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
8
9 GITVERSION:=$(shell git rev-parse HEAD)
10
11 DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
12 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
13
14 all:
15
16 $(SRCDIR)/vnc.html: submodule
17 $(BUILDDIR): $(SRCDIR)/vnc.html
18 rm -rf $(BUILDDIR)
19 cp -rpa $(SRCDIR) $(BUILDDIR)
20 cp -a debian $(BUILDDIR)
21 echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
22
23 .PHONY: deb
24 deb: $(DEB)
25 $(DEB): $(BUILDDIR)
26 cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
27 lintian $(DEB)
28 @echo $(DEB)
29
30 $(ORIG_SRC_TAR): $(BUILDDIR)
31 tar czf $(ORIG_SRC_TAR) -C $(BUILDDIR) .
32
33 .PHONY: dsc
34 dsc: $(DSC)
35 $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
36 cd $(BUILDDIR); dpkg-buildpackage -S -uc -us -d
37 lintian $(DSC)
38
39 .PHONY: submodule
40 submodule:
41 test -f "$(SRCDIR)/package.json" || git submodule update --init
42
43 .PHONY: download
44 download $(SRCDIR):
45 git submodule foreach 'git pull --ff-only origin master'
46
47 .PHONY: upload
48 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
49 upload: $(DEB)
50 tar cf - $(DEB)|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist $(UPLOAD_DIST)
51
52 .PHONY: distclean
53 distclean: clean
54
55 .PHONY: clean
56 clean:
57 rm -rf $(PACKAGE)-[0-9]*/ $() *.deb *.dsc $(PACKAGE)*.tar.[gx]z *.changes *.dsc *.buildinfo *.build
58
59 .PHONY: dinstall
60 dinstall: deb
61 dpkg -i $(DEB)