]> git.proxmox.com Git - pve-qemu.git/blob - Makefile
savevm-async: fix function name in error message
[pve-qemu.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE = pve-qemu-kvm
5
6 SRCDIR := qemu
7 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
8
9 GITVERSION := $(shell git rev-parse HEAD)
10
11 DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
12 DEB_DBG = ${PACKAGE}-dbg_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
13 DEBS = $(DEB) $(DEB_DBG)
14
15 all: $(DEBS)
16
17 .PHONY: submodule
18 submodule:
19 test -f "${SRCDIR}/configure" || git submodule update --init --recursive
20
21 $(BUILDDIR): keycodemapdb | submodule
22 # check if qemu/ was used for a build
23 # if so, please run 'make distclean' in the submodule and try again
24 test ! -f $(SRCDIR)/build/config.status
25 rm -rf $(BUILDDIR)
26 cp -a $(SRCDIR) $(BUILDDIR)
27 cp -a debian $(BUILDDIR)/debian
28 rm -rf $(BUILDDIR)/ui/keycodemapdb
29 cp -a keycodemapdb $(BUILDDIR)/ui/
30 echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
31
32 .PHONY: deb kvm
33 deb kvm: $(DEBS)
34 $(DEB_DBG): $(DEB)
35 $(DEB): $(BUILDDIR)
36 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
37 lintian $(DEBS)
38
39 .PHONY: update
40 update:
41 cd $(SRCDIR) && git submodule deinit ui/keycodemapdb || true
42 rm -rf $(SRCDIR)/ui/keycodemapdb
43 mkdir $(SRCDIR)/ui/keycodemapdb
44 cd $(SRCDIR) && git submodule update --init ui/keycodemapdb
45 rm -rf keycodemapdb
46 mkdir keycodemapdb
47 cp -R $(SRCDIR)/ui/keycodemapdb/* keycodemapdb/
48 git add keycodemapdb
49
50 .PHONY: upload
51 upload: $(DEBS)
52 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist bullseye
53
54 .PHONY: distclean clean
55 distclean: clean
56 clean:
57 rm -rf $(BUILDDIR) $(PACKAGE)*.deb *.buildinfo *.changes
58
59 .PHONY: dinstall
60 dinstall: $(DEBS)
61 dpkg -i $(DEBS)