]> git.proxmox.com Git - pve-qemu.git/blame - Makefile
savevm-async: fix function name in error message
[pve-qemu.git] / Makefile
CommitLineData
06299321
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
95259824 3
06299321 4PACKAGE = pve-qemu-kvm
95259824
WB
5
6SRCDIR := qemu
06299321 7BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
95259824 8
d2494dd2 9GITVERSION := $(shell git rev-parse HEAD)
95259824 10
06299321
TL
11DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
12DEB_DBG = ${PACKAGE}-dbg_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
95259824
WB
13DEBS = $(DEB) $(DEB_DBG)
14
95259824
WB
15all: $(DEBS)
16
17.PHONY: submodule
18submodule:
d7722e1a 19 test -f "${SRCDIR}/configure" || git submodule update --init --recursive
95259824 20
06299321 21$(BUILDDIR): keycodemapdb | submodule
817b7667
SR
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
06299321
TL
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
06299321 31
95259824
WB
32.PHONY: deb kvm
33deb kvm: $(DEBS)
34$(DEB_DBG): $(DEB)
06299321
TL
35$(DEB): $(BUILDDIR)
36 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
37 lintian $(DEBS)
95259824 38
6838f038
WB
39.PHONY: update
40update:
06299321
TL
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
6838f038
WB
45 rm -rf keycodemapdb
46 mkdir keycodemapdb
06299321 47 cp -R $(SRCDIR)/ui/keycodemapdb/* keycodemapdb/
6838f038
WB
48 git add keycodemapdb
49
95259824
WB
50.PHONY: upload
51upload: $(DEBS)
db687e3c 52 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist bullseye
95259824 53
06299321 54.PHONY: distclean clean
95259824 55distclean: clean
95259824 56clean:
0a321ffd 57 rm -rf $(BUILDDIR) $(PACKAGE)*.deb *.buildinfo *.changes
95259824
WB
58
59.PHONY: dinstall
60dinstall: $(DEBS)
61 dpkg -i $(DEBS)