5
0
mirror of git://git.proxmox.com/git/spiceterm.git synced 2025-01-18 06:03:56 +03:00
spiceterm/Makefile
Thomas Lamprecht 787841818b buildsys: expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-26 15:22:40 +02:00

49 lines
1.2 KiB
Makefile

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
PACKAGE=spiceterm
GITVERSION:=$(shell cat .git/refs/heads/master)
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
$(BUILDDIR): src/ debian/
rm -rf $(BUILDDIR)
rsync -a src/ debian $(BUILDDIR)
echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
.PHONY: dsc
dsc: clean
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
sbuild: $(DSC)
sbuild $<
.PHONY: deb
deb: $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
.PHONY: dinstall
dinstall: $(DEB)
dpkg -i $(DEB)
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEB)
tar cf - $(DEB) $(DBG_DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)
.PHONY: distclean clean
distclean: clean
clean:
$(MAKE) -C src $@
rm -rf *~ $(PACKAGE)-*/ $(PACKAGE)*.tar* *.deb *.dsc *.changes *.build *.buildinfo