]> git.proxmox.com Git - pve-qemu-kvm.git/commitdiff
buildsys: handle different target architectures
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 15 Mar 2017 10:33:11 +0000 (11:33 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 15 Mar 2017 10:40:33 +0000 (11:40 +0100)
Makefile
debian/rules

index b2333b0982c16a4230c77906ea45140c8ef7e0d7..f90bb1738940b2f24d7a9ed2e9b519fc79de5a4e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ KVMPACKAGE=pve-qemu-kvm
 KVMDIR=qemu-kvm
 KVMSRC=${KVMDIR}-src.tar.gz
 
-ARCH=amd64
+ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 GITVERSION:=$(shell git rev-parse master)
 
 DEB=${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}_${ARCH}.deb
index 26a06a7e3723723fe7a01fb42a5431a2e9b87aa4..624d6e9ec7330bc9f75a4bb41b5390d4dfb7a33b 100755 (executable)
@@ -15,6 +15,8 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+
 PACKAGE=pve-qemu-kvm
 destdir := $(CURDIR)/debian/$(PACKAGE)
 
@@ -33,7 +35,7 @@ endif
 config.status: configure
        dh_testdir
        # Add here commands to configure the package.
-       ./configure --with-confsuffix="/kvm" --target-list=x86_64-softmmu --prefix=/usr --datadir=/usr/share --docdir=/usr/share/doc/pve-qemu-kvm --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls --enable-sdl --enable-uuid --enable-linux-aio --enable-rbd --enable-libiscsi --disable-smartcard --audio-drv-list="alsa" --enable-spice --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc --disable-libnfs --disable-fdt
+       ./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu --prefix=/usr --datadir=/usr/share --docdir=/usr/share/doc/pve-qemu-kvm --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls --enable-sdl --enable-uuid --enable-linux-aio --enable-rbd --enable-libiscsi --disable-smartcard --audio-drv-list="alsa" --enable-spice --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc --disable-libnfs --disable-fdt
 
 build: patch build-stamp
 
@@ -73,7 +75,7 @@ install: build
        # Add here commands to install the package into debian/pve-kvm.
        $(MAKE) DESTDIR=$(destdir) install
 
-       mv $(destdir)/usr/bin/qemu-system-x86_64 $(destdir)/usr/bin/kvm
+       mv $(destdir)/usr/bin/qemu-system-$(ARCH) $(destdir)/usr/bin/kvm
        mv $(destdir)/usr/share/man/man1/qemu.1 $(destdir)/usr/share/man/man1/kvm.1
 
        # Install the userspace utilities