# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
-name = qemu-kvm
-version = 0.15.0
+name = qemu
+version = 3.1.0
release = 1
groups = Applications/Virtualization
-url = http://www.linux-kvm.org/page/Main_Page
+url = http://www.qemu.org
license = GPLv2+
summary = QEMU is a generic and open source machine emulator and virtualizer.
architectures.
end
-source_dl =
+source_dl = https://download.qemu.org/
+sources = %{thisapp}.tar.xz
build
requires
+ SDL-devel
+ autoconf
+ automake
+ bison
+ bzip2-devel
+ flex
glib2-devel
+ gnutls-devel
libcurl-devel
+ libgcrypt-devel
+ libjpeg-devel
+ libpng-devel
+ libseccomp-devel
+ libtasn1-devel
+ libusb-devel
libuuid-devel
- gnutls-devel
+ lzo-devel
ncurses-devel
+ nettle-devel
pciutils-devel
- sdl-devel
+ pixman-devel
zlib-devel
end
+ qemu_native_platform = %{DISTRO_ARCH}
+
+ if "%{DISTRO_ARCH}" == "armv7hl"
+ qemu_native_platform = arm
+ end
+
+ targets = aarch64-softmmu arm-softmmu x86_64-softmmu
+
configure_options = \
- --prefix=/usr \
- --enable-kvm \
+ --prefix=%{prefix} \
+ --bindir=%{bindir} \
+ --sysconfdir=%{sysconfdir} \
+ --libdir=%{libdir} \
+ --libexecdir=%{libdir} \
+ --datadir=%{datadir} \
+ --mandir=%{mandir} \
+ --localstatedir=%{localstatedir} \
--extra-cflags="%{CFLAGS}" \
+ --extra-ldflags="%{LDFLAGS}" \
--disable-strip \
- --disable-xen \
- --sysconfdir=/etc \
- --target-list="i386-softmmu arm-softmmu"
+ --disable-werror \
+ --target-list="%{targets}" \
+ --enable-bzip2 \
+ --enable-fdt \
+ --enable-kvm \
+ --enable-libusb \
+ --enable-lzo \
+ --enable-pie \
+ --enable-vnc \
+ --enable-vnc-jpeg \
+ --enable-vnc-png \
+ --disable-xen
configure_cmds
- sed -e "s@-Wl,-rpath,/usr/lib@@g" -i */config-target.mak
+ sed -e "s@-Wl,-rpath,%{libdir}@@g" -i config-host.mak
+ end
+
+ install_cmds
+ # Remove BIOS file which is an ELF files w/ invalid interpreter
+ rm -vf %{BUILDROOT}%{datadir}/qemu/s390-*.img
+
+ # Remove ivshm stuff
+ rm -vf %{BUILDROOT}%{bindir}/ivshmem* %{BUILDROOT}%{mandir}/ivshmem*
end
end
packages
package %{name}
+ # Always install the native package (for KVM)
+ requires
+ qemu-%{qemu_native_platform} = %{thisver}
+ end
+
+ recommends
+ qemu-img = %{thisver}
+ end
+ end
+
+ template QEMUARCH
+ summary = QEMU for %{qemu_arch}
+ description = %{summary}
+
+ requires = %{name} = %{thisver}
+
+ files
+ %{bindir}/qemu-system-%{qemu_arch}
+ %{mandir}/man1/qemu-system-%{qemu_arch}.1*
+ end
+ end
+
+ package %{name}-aarch64
+ template QEMUARCH
+ qemu_arch = aarch64
+ end
+
+ package %{name}-arm
+ template QEMUARCH
+ qemu_arch = arm
+ end
+
+ package %{name}-x86_64
+ template QEMUARCH
+ qemu_arch = x86_64
+ end
+
+ package %{name}-img
+ summary = QEMU command line tool for manipulating disk images
+ description
+ This package provides a command line tool for manipulating disk images
+ end
+
+ files
+ %{bindir}/qemu-img
+ %{bindir}/qemu-io
+ %{bindir}/qemu-nbd
+ %{mandir}/man1/qemu-img.1*
+ %{mandir}/man8/qemu-nbd.8*
+ end
+ end
package %{name}-debuginfo
template DEBUGINFO