2023-05-19 14:24:32 +03:00
|
|
|
include /usr/share/dpkg/default.mk
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2019-05-22 18:12:12 +03:00
|
|
|
PACKAGE = pve-qemu-kvm
|
2017-04-05 11:49:19 +03:00
|
|
|
|
|
|
|
SRCDIR := qemu
|
2019-05-22 18:12:12 +03:00
|
|
|
BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2017-11-29 12:25:06 +03:00
|
|
|
GITVERSION := $(shell git rev-parse HEAD)
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2019-05-22 18:12:12 +03:00
|
|
|
DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
|
|
|
|
DEB_DBG = ${PACKAGE}-dbg_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
|
2017-04-05 11:49:19 +03:00
|
|
|
DEBS = $(DEB) $(DEB_DBG)
|
|
|
|
|
|
|
|
all: $(DEBS)
|
|
|
|
|
|
|
|
.PHONY: submodule
|
|
|
|
submodule:
|
2019-06-06 13:59:12 +03:00
|
|
|
test -f "${SRCDIR}/configure" || git submodule update --init --recursive
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2019-05-22 18:12:12 +03:00
|
|
|
$(BUILDDIR): keycodemapdb | submodule
|
2021-02-11 19:11:11 +03:00
|
|
|
# check if qemu/ was used for a build
|
|
|
|
# if so, please run 'make distclean' in the submodule and try again
|
|
|
|
test ! -f $(SRCDIR)/build/config.status
|
2019-05-22 18:12:12 +03:00
|
|
|
rm -rf $(BUILDDIR)
|
|
|
|
cp -a $(SRCDIR) $(BUILDDIR)
|
|
|
|
cp -a debian $(BUILDDIR)/debian
|
|
|
|
rm -rf $(BUILDDIR)/ui/keycodemapdb
|
|
|
|
cp -a keycodemapdb $(BUILDDIR)/ui/
|
|
|
|
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
|
|
|
|
|
2017-04-05 11:49:19 +03:00
|
|
|
.PHONY: deb kvm
|
|
|
|
deb kvm: $(DEBS)
|
|
|
|
$(DEB_DBG): $(DEB)
|
2019-05-22 18:12:12 +03:00
|
|
|
$(DEB): $(BUILDDIR)
|
|
|
|
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
|
|
|
|
lintian $(DEBS)
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2018-02-22 14:34:57 +03:00
|
|
|
.PHONY: update
|
|
|
|
update:
|
2019-05-22 18:12:12 +03:00
|
|
|
cd $(SRCDIR) && git submodule deinit ui/keycodemapdb || true
|
|
|
|
rm -rf $(SRCDIR)/ui/keycodemapdb
|
|
|
|
mkdir $(SRCDIR)/ui/keycodemapdb
|
|
|
|
cd $(SRCDIR) && git submodule update --init ui/keycodemapdb
|
2018-02-22 14:34:57 +03:00
|
|
|
rm -rf keycodemapdb
|
|
|
|
mkdir keycodemapdb
|
2019-05-22 18:12:12 +03:00
|
|
|
cp -R $(SRCDIR)/ui/keycodemapdb/* keycodemapdb/
|
2018-02-22 14:34:57 +03:00
|
|
|
git add keycodemapdb
|
|
|
|
|
2017-04-05 11:49:19 +03:00
|
|
|
.PHONY: upload
|
2023-05-19 14:24:32 +03:00
|
|
|
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
|
2017-04-05 11:49:19 +03:00
|
|
|
upload: $(DEBS)
|
2023-05-19 14:24:32 +03:00
|
|
|
tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
|
2017-04-05 11:49:19 +03:00
|
|
|
|
2019-05-22 18:12:12 +03:00
|
|
|
.PHONY: distclean clean
|
2017-04-05 11:49:19 +03:00
|
|
|
distclean: clean
|
|
|
|
clean:
|
2019-05-22 19:06:57 +03:00
|
|
|
rm -rf $(BUILDDIR) $(PACKAGE)*.deb *.buildinfo *.changes
|
2017-04-05 11:49:19 +03:00
|
|
|
|
|
|
|
.PHONY: dinstall
|
|
|
|
dinstall: $(DEBS)
|
|
|
|
dpkg -i $(DEBS)
|