pve-qemu-qoup/Makefile

61 lines
1.6 KiB
Makefile
Raw Normal View History

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
2017-04-05 11:49:19 +03:00
PACKAGE = pve-qemu-kvm
2017-04-05 11:49:19 +03:00
SRCDIR := qemu
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
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:
test -f "${SRCDIR}/debian/changelog" || git submodule update --init
$(BUILDDIR): keycodemapdb | submodule
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
# set package version
sed -i 's/^pkgversion="".*/pkgversion="${PACKAGE}_${KVMVER}-${KVMPKGREL}"/' $(BUILDDIR)/configure
2017-04-05 11:49:19 +03:00
.PHONY: deb kvm
deb kvm: $(DEBS)
$(DEB_DBG): $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
lintian $(DEBS)
2017-04-05 11:49:19 +03:00
.PHONY: update
update:
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
rm -rf keycodemapdb
mkdir keycodemapdb
cp -R $(SRCDIR)/ui/keycodemapdb/* keycodemapdb/
git add keycodemapdb
2017-04-05 11:49:19 +03:00
.PHONY: upload
upload: $(DEBS)
2017-04-05 12:38:26 +03:00
tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
2017-04-05 11:49:19 +03:00
.PHONY: distclean clean
2017-04-05 11:49:19 +03:00
distclean: clean
clean:
rm -rf $(BUILDDIR) $(PACKAGE)*.deb *.buildinfo *.changes
2017-04-05 11:49:19 +03:00
.PHONY: dinstall
dinstall: $(DEBS)
dpkg -i $(DEBS)