5
0
mirror of git://git.proxmox.com/git/novnc-pve.git synced 2024-12-22 17:34:20 +03:00
novnc-pve/Makefile
Thomas Lamprecht 52ea04cd6d buildsys: add sbuild target for convenience
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-08 14:32:29 +02:00

65 lines
1.5 KiB
Makefile

include /usr/share/dpkg/default.mk
PACKAGE=novnc-pve
SRCDIR=novnc
BUILDDIR=$(SRCDIR).tmp
ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
GITVERSION:=$(shell git rev-parse HEAD)
DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
all:
$(SRCDIR)/vnc.html: submodule
$(BUILDDIR): $(SRCDIR)/vnc.html
rm -rf $(BUILDDIR)
cp -rpa $(SRCDIR) $(BUILDDIR)
cp -a debian $(BUILDDIR)
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
.PHONY: deb
deb: $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
lintian $(DEB)
@echo $(DEB)
$(ORIG_SRC_TAR): $(BUILDDIR)
tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
.PHONY: dsc
dsc: $(DSC)
$(DSC): $(ORIG_SRC_TAR) $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -uc -us -d
lintian $(DSC)
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: submodule
submodule:
test -f "$(SRCDIR)/package.json" || git submodule update --init
.PHONY: download
download $(SRCDIR):
git submodule foreach 'git pull --ff-only origin master'
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEB)
tar cf - $(DEB)|ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist $(UPLOAD_DIST)
.PHONY: distclean
distclean: clean
.PHONY: clean
clean:
rm -rf $(PACKAGE)-[0-9]*/ $() *.deb *.dsc $(PACKAGE)*.tar.[gx]z *.changes *.dsc *.buildinfo *.build
.PHONY: dinstall
dinstall: deb
dpkg -i $(DEB)