pve-qemu-qoup/Makefile

67 lines
1.7 KiB
Makefile
Raw Normal View History

2017-04-05 11:49:19 +03:00
# also update debian/changelog
KVMVER=2.11.1
KVMPKGREL=3
2017-04-05 11:49:19 +03:00
KVMPACKAGE = pve-qemu-kvm
KVMSRC = qemu
BUILDSRC = $(KVMSRC).tmp
SRCDIR := qemu
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
2017-11-29 12:25:06 +03:00
GITVERSION := $(shell git rev-parse HEAD)
2017-04-05 11:49:19 +03:00
DEB = ${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}_${ARCH}.deb
DEB_DBG = ${KVMPACKAGE}-dbg_${KVMVER}-${KVMPKGREL}_${ARCH}.deb
DEBS = $(DEB) $(DEB_DBG)
all: $(DEBS)
.PHONY: submodule
submodule:
test -f "${SRCDIR}/debian/changelog" || git submodule update --init
.PHONY: deb kvm
deb kvm: $(DEBS)
$(DEB_DBG): $(DEB)
$(DEB): keycodemapdb | submodule
2017-04-05 11:49:19 +03:00
rm -f *.deb
rm -rf $(BUILDSRC)
mkdir $(BUILDSRC)
cp -a $(KVMSRC)/* $(BUILDSRC)/
cp -a debian $(BUILDSRC)/debian
rm -rf $(BUILDSRC)/ui/keycodemapdb
cp -a keycodemapdb $(BUILDSRC)/ui/
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE
2017-04-05 11:49:19 +03:00
# set package version
sed -i 's/^pkgversion="".*/pkgversion="${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}"/' $(BUILDSRC)/configure
cd $(BUILDSRC); dpkg-buildpackage -b -rfakeroot -us -uc
lintian $(DEBS) || true
.PHONY: update
update:
cd $(KVMSRC) && git submodule deinit ui/keycodemapdb || true
rm -rf $(KVMSRC)/ui/keycodemapdb
mkdir $(KVMSRC)/ui/keycodemapdb
cd $(KVMSRC) && git submodule update --init ui/keycodemapdb
rm -rf keycodemapdb
mkdir keycodemapdb
cp -R $(KVMSRC)/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
distclean: clean
.PHONY: clean
clean:
rm -rf $(BUILDSRC) $(KVMPACKAGE)_* $(DEBS) *.buildinfo
.PHONY: dinstall
dinstall: $(DEBS)
dpkg -i $(DEBS)