]>
Commit | Line | Data |
---|---|---|
85269ac9 | 1 | include /usr/share/dpkg/default.mk |
815c0744 | 2 | |
0fbbbb73 | 3 | PACKAGE=novnc-pve |
0fbbbb73 | 4 | |
339cafef | 5 | SRCDIR=novnc |
9a6cbb26 | 6 | BUILDDIR=$(SRCDIR).tmp |
d87f9815 | 7 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz |
42e49257 | 8 | |
5f6ca76d | 9 | GITVERSION:=$(shell git rev-parse HEAD) |
42e49257 | 10 | |
9a6cbb26 TL |
11 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb |
12 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc | |
0fbbbb73 | 13 | |
60bc3cd8 | 14 | all: |
42e49257 | 15 | |
9a6cbb26 TL |
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 | |
018065f9 TL |
22 | |
23 | .PHONY: deb | |
9a6cbb26 TL |
24 | deb: $(DEB) |
25 | $(DEB): $(BUILDDIR) | |
26 | cd $(BUILDDIR); dpkg-buildpackage -b -uc -us | |
27 | lintian $(DEB) | |
28 | @echo $(DEB) | |
339cafef | 29 | |
d87f9815 TL |
30 | $(ORIG_SRC_TAR): $(BUILDDIR) |
31 | tar czf $(ORIG_SRC_TAR) -C $(BUILDDIR) . | |
32 | ||
018065f9 | 33 | .PHONY: dsc |
9a6cbb26 | 34 | dsc: $(DSC) |
d87f9815 | 35 | $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR) |
9a6cbb26 TL |
36 | cd $(BUILDDIR); dpkg-buildpackage -S -uc -us -d |
37 | lintian $(DSC) | |
018065f9 | 38 | |
339cafef DC |
39 | .PHONY: submodule |
40 | submodule: | |
9a6cbb26 | 41 | test -f "$(SRCDIR)/package.json" || git submodule update --init |
42e49257 DM |
42 | |
43 | .PHONY: download | |
9a6cbb26 | 44 | download $(SRCDIR): |
339cafef | 45 | git submodule foreach 'git pull --ff-only origin master' |
42e49257 | 46 | |
323d6cac | 47 | .PHONY: upload |
85269ac9 | 48 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
9a6cbb26 | 49 | upload: $(DEB) |
85269ac9 | 50 | tar cf - $(DEB)|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist $(UPLOAD_DIST) |
323d6cac DM |
51 | |
52 | .PHONY: distclean | |
53 | distclean: clean | |
54 | ||
42e49257 DM |
55 | .PHONY: clean |
56 | clean: | |
9dcb805d | 57 | rm -rf $(PACKAGE)-[0-9]*/ $() *.deb *.dsc $(PACKAGE)*.tar.[gx]z *.changes *.dsc *.buildinfo *.build |
339cafef DC |
58 | |
59 | .PHONY: dinstall | |
60 | dinstall: deb | |
9a6cbb26 | 61 | dpkg -i $(DEB) |