]> git.proxmox.com Git - spiceterm.git/blob - Makefile
buildsys: improve DSC target & add sbuild convenience target
[spiceterm.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=spiceterm
5
6 GITVERSION:=$(shell cat .git/refs/heads/master)
7 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
8
9 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
10 DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
11 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
12
13 $(BUILDDIR): src/ debian/
14 rm -rf $(BUILDDIR)
15 rsync -a src/ debian $(BUILDDIR)
16 echo "git clone git://git.proxmox.com/git/spiceterm.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
17
18 .PHONY: dsc
19 dsc: clean
20 $(MAKE) $(DSC)
21 lintian $(DSC)
22
23 $(DSC): $(BUILDDIR)
24 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
25
26 sbuild: $(DSC)
27 sbuild $<
28
29 .PHONY: deb
30 deb: $(DEB)
31 $(DEB): $(BUILDDIR)
32 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
33 lintian $(DEB)
34
35 .PHONY: dinstall
36 dinstall: $(DEB)
37 dpkg -i $(DEB)
38
39 .PHONY: upload
40 upload: $(DEB)
41 tar cf - $(DEB) $(DBG_DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch $(ARCH)
42
43 .PHONY: distclean clean
44 distclean: clean
45 clean:
46 rm -rf *~ $(PACKAGE)-*/ *.deb *.changes genfont *.buildinfo *.dsc *.tar.gz