update to qemu-2.9.0-rc2
[pve-qemu-kvm.git] / Makefile
1 # also update debian/changelog
2 KVMVER=2.9.0
3 KVMTAG=$(KVMVER)-rc2
4 KVMPKGREL=1~rc2
5
6 KVMPACKAGE=pve-qemu-kvm
7 KVMDIR=qemu-kvm
8 KVMSRC=${KVMDIR}-src.tar.gz
9
10 ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
11 GITVERSION:=$(shell git rev-parse master)
12
13 DEB=${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}_${ARCH}.deb
14 DEB_DBG=${KVMPACKAGE}-dbg_${KVMVER}-${KVMPKGREL}_${ARCH}.deb
15 DEBS=$(DEB) $(DEB_DBG)
16
17
18 all: $(DEBS)
19
20 .PHONY: download
21 download:
22         rm -rf ${KVMDIR} ${KVMSRC}
23         git clone --depth=1 git://git.qemu-project.org/qemu.git -b v${KVMTAG} ${KVMDIR}
24         tar czf ${KVMSRC} --exclude CVS --exclude .git --exclude .svn ${KVMDIR}
25
26 .PHONY: deb kvm
27 deb kvm: $(DEBS)
28 $(DEB_DBG): $(DEB)
29 $(DEB): $(KVMSRC)
30         rm -f *.deb
31         rm -rf ${KVMDIR}
32         tar xf ${KVMSRC} 
33         cp -a debian ${KVMDIR}/debian
34         echo "git clone git://git.proxmox.com/git/pve-qemu-kvm.git\\ngit checkout ${GITVERSION}" > ${KVMDIR}/debian/SOURCE
35         # set package version
36         sed -i 's/^pkgversion="".*/pkgversion="${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}"/' ${KVMDIR}/configure
37         cd ${KVMDIR}; dpkg-buildpackage -b -rfakeroot -us -uc
38         lintian ${DEBS} || true
39
40 .PHONY: upload
41 upload: ${DEBS}
42         tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
43
44 .PHONY: distclean
45 distclean: clean
46
47
48 .PHONY: clean
49 clean:
50         rm -rf *.changes *.buildinfo ${KVMDIR} ${KVMPACKAGE}_* ${DEBS}
51
52 .PHONY: dinstall
53 dinstall: ${DEBS}
54         dpkg -i ${DEBS}