From: Wolfgang Bumiller Date: Wed, 15 Mar 2017 10:33:11 +0000 (+0100) Subject: buildsys: handle different target architectures X-Git-Url: https://git.proxmox.com/?p=pve-qemu-kvm.git;a=commitdiff_plain;h=1be2b9487d5da591a853e019c7f2181153b92233 buildsys: handle different target architectures --- diff --git a/Makefile b/Makefile index b2333b0..f90bb17 100644 --- 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 diff --git a/debian/rules b/debian/rules index 26a06a7..624d6e9 100755 --- a/debian/rules +++ b/debian/rules @@ -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