e6d232d
# For FC >= 6 we have gcc 3.4, for FC <= 5 we have gcc 3.2
e6d232d
%if %{!?fedora:6}%{?fedora} >= 6
e6d232d
%define gccver 34
e6d232d
%else
e6d232d
%define gccver 32
e6d232d
%endif
e6d232d
5c37348
Summary: QEMU is a FAST! processor emulator
5c37348
Name: qemu
e62519f
Version: 0.9.1
f2617db
Release: 5%{?dist}
e62519f
License: GPLv2+ and LGPLv2+
5c37348
Group: Development/Tools
67348d7
URL: http://www.qemu.org/
9f8ef0c
Source0: http://www.qemu.org/%{name}-%{version}.tar.gz
5c37348
Source1: qemu.init
9b980ed
Patch0: qemu-0.7.0-build.patch
304b402
# Change default NIC to rtl8139 to get link-state detection
e62519f
Patch3: qemu-0.9.1-nic-defaults.patch
b80713d
Patch4: qemu-%{version}-block-rw-range-check.patch
1ca9271
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
304b402
BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html gnutls-devel
67348d7
Requires(post): /sbin/chkconfig
67348d7
Requires(preun): /sbin/service /sbin/chkconfig
67348d7
Requires(postun): /sbin/service
36ffedc
Requires: %{name}-img = %{version}-%{release}
67348d7
ExclusiveArch: %{ix86} x86_64 ppc alpha sparc armv4l
5c37348
5c37348
%description
67348d7
QEMU is a generic and open source processor emulator which achieves a good
67348d7
emulation speed by using dynamic translation. QEMU has two operating modes:
5c37348
67348d7
 * Full system emulation. In this mode, QEMU emulates a full system (for
67348d7
   example a PC), including a processor and various peripherials. It can be
67348d7
   used to launch different Operating Systems without rebooting the PC or
67348d7
   to debug system code.
5c37348
 * User mode emulation. In this mode, QEMU can launch Linux processes compiled
67348d7
   for one CPU on another CPU.
5c37348
67348d7
As QEMU requires no host kernel patches to run, it is safe and easy to use.
5c37348
36ffedc
%package img
36ffedc
Summary: QEMU is a FAST! processor emulator
36ffedc
Group: Development/Tools
36ffedc
36ffedc
%description img
36ffedc
QEMU is a generic and open source processor emulator which achieves a good
36ffedc
emulation speed by using dynamic translation.
36ffedc
36ffedc
This package provides the command line tool for manipulating disk images
36ffedc
5c37348
%prep
5c37348
%setup -q
c8e4b31
%patch0 -p1
304b402
%patch3 -p1
b80713d
%patch4 -p1
5c37348
5c37348
%build
e6d232d
./configure \
e6d232d
    --prefix=%{_prefix} \
e6d232d
    --interp-prefix=%{_prefix}/qemu-%%M \
e6d232d
    --cc=gcc%{gccver} \
4ecadb0
    --enable-alsa \
4ecadb0
    --extra-ldflags="-Wl,--build-id"
4ecadb0
make %{?_smp_mflags} VL_LDFLAGS="-Wl,--build-id"
5c37348
5c37348
%install
5c37348
rm -rf $RPM_BUILD_ROOT
5c37348
5c37348
make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
67348d7
     bindir="${RPM_BUILD_ROOT}%{_bindir}" \
67348d7
     sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
67348d7
     mandir="${RPM_BUILD_ROOT}%{_mandir}" \
67348d7
     docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
67348d7
     datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
76b47ee
chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
8cd57ac
67348d7
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
5c37348
5c37348
%clean
5c37348
rm -rf $RPM_BUILD_ROOT
5c37348
5c37348
%post
5c37348
/sbin/chkconfig --add qemu
5c37348
5c37348
%preun
67348d7
if [ $1 -eq 0 ]; then
67348d7
    /sbin/service qemu stop &>/dev/null || :
67348d7
    /sbin/chkconfig --del qemu
67348d7
fi
67348d7
67348d7
%postun
67348d7
if [ $1 -ge 1 ]; then
67348d7
    /sbin/service qemu condrestart &>/dev/null || :
5c37348
fi
5c37348
5c37348
%files
5c37348
%defattr(-,root,root)
4cf268e
%doc Changelog README TODO
67348d7
%doc qemu-doc.html qemu-tech.html
f579225
%doc COPYING COPYING.LIB LICENSE
e62519f
%{_sysconfdir}/rc.d/init.d/qemu
36ffedc
%{_bindir}/qemu
36ffedc
%{_bindir}/qemu-arm
36ffedc
%{_bindir}/qemu-armeb
36ffedc
%{_bindir}/qemu-i386
36ffedc
%{_bindir}/qemu-m68k
36ffedc
%{_bindir}/qemu-mips
36ffedc
%{_bindir}/qemu-mipsel
36ffedc
%{_bindir}/qemu-ppc
36ffedc
%{_bindir}/qemu-sparc
36ffedc
%{_bindir}/qemu-system-arm
36ffedc
%{_bindir}/qemu-system-mips
36ffedc
%{_bindir}/qemu-system-mipsel
36ffedc
%{_bindir}/qemu-system-ppc
36ffedc
%{_bindir}/qemu-system-sparc
36ffedc
%{_bindir}/qemu-system-x86_64
67348d7
%{_bindir}/qemu*
67348d7
%{_prefix}/share/qemu/
36ffedc
%{_mandir}/man1/qemu.1*
36ffedc
36ffedc
%files img
36ffedc
%defattr(-,root,root)
36ffedc
%{_bindir}/qemu-img
36ffedc
%{_mandir}/man1/qemu-img.1*
5c37348
5c37348
%changelog
36ffedc
* Wed Mar 19 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-5.fc9
36ffedc
- Split qemu-img tool into sub-package for smaller footprint installs
36ffedc
0778a10
* Wed Feb 27 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-4.fc9
0778a10
- Fix block device checks for extendable disk formats (rhbz #435139)
0778a10
0778a10
* Sat Feb 23 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-3.fc9
b80713d
- Fix block device extents check (rhbz #433560)
b80713d
6095772
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.1-2
6095772
- Autorebuild for GCC 4.3
6095772
e62519f
* Tue Jan  8 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-1.fc9
e62519f
- Updated to 0.9.1 release
e62519f
- Fix license tag syntax
e62519f
- Don't mark init script as a config file
e62519f
f4a1bb2
* Wed Sep 26 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-5.fc8
f4a1bb2
- Fix rtl8139 checksum calculation for Vista (rhbz #308201)
f4a1bb2
4ecadb0
* Tue Aug 28 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-4.fc8
4ecadb0
- Fix debuginfo by passing -Wl,--build-id to linker
4ecadb0
e415ab2
* Tue Aug 28 2007 David Woodhouse <dwmw2@infradead.org> 0.9.0-4
e415ab2
- Update licence
e415ab2
- Fix CDROM emulation (#253542)
e415ab2
304b402
* Tue Aug 28 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-3.fc8
304b402
- Added backport of VNC password auth, and TLS+x509 cert auth
304b402
- Switch to rtl8139 NIC by default for linkstate reporting
304b402
- Fix rtl8139 mmio region mappings with multiple NICs
304b402
76b47ee
* Sun Apr  1 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-2
76b47ee
- Fix direct loading of a linux kernel with -kernel & -initrd (bz 234681)
76b47ee
- Remove spurious execute bits from manpages (bz 222573)
76b47ee
4cf268e
* Tue Feb  6 2007 David Woodhouse <dwmw2@infradead.org> 0.9.0-1
4cf268e
- Update to 0.9.0
4cf268e
f579225
* Wed Jan 31 2007 David Woodhouse <dwmw2@infradead.org> 0.8.2-5
f579225
- Include licences
f579225
019db4e
* Mon Nov 13 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.8.2-4
019db4e
- Backport patch to make FC6 guests work by Kevin Kofler
019db4e
  <Kevin@tigcc.ticalc.org> (bz 207843).
019db4e
f6b93be
* Mon Sep 11 2006 David Woodhouse <dwmw2@infradead.org> 0.8.2-3
f6b93be
- Rebuild
f6b93be
e6d232d
* Thu Aug 24 2006 Matthias Saou <http://freshrpms.net/> 0.8.2-2
e6d232d
- Remove the target-list iteration for x86_64 since they all build again.
e6d232d
- Make gcc32 vs. gcc34 conditional on %%{fedora} to share the same spec for
e6d232d
  FC5 and FC6.
e6d232d
67348d7
* Wed Aug 23 2006 Matthias Saou <http://freshrpms.net/> 0.8.2-1
67348d7
- Update to 0.8.2 (#200065).
67348d7
- Drop upstreamed syscall-macros patch2.
67348d7
- Put correct scriplet dependencies.
67348d7
- Force install mode for the init script to avoid umask problems.
67348d7
- Add %%postun condrestart for changes to the init script to be applied if any.
67348d7
- Update description with the latest "about" from the web page (more current).
67348d7
- Update URL to qemu.org one like the Source.
67348d7
- Add which build requirement.
67348d7
- Don't include texi files in %%doc since we ship them in html.
01139d8
- Switch to using gcc34 on devel, FC5 still has gcc32.
5d09533
- Add kernheaders patch to fix linux/compiler.h inclusion.
5c9bd86
- Add target-sparc patch to fix compiling on ppc (some int32 to float).
67348d7
1ca9271
* Thu Jun  8 2006 David Woodhouse <dwmw2@infradead.org> 0.8.1-3
1ca9271
- More header abuse in modify_ldt(), change BuildRoot:
1ca9271
1ca9271
* Wed Jun  7 2006 David Woodhouse <dwmw2@infradead.org> 0.8.1-2
fb30f3e
- Fix up kernel header abuse
fb30f3e
7b2bfbe
* Tue May 30 2006 David Woodhouse <dwmw2@infradead.org> 0.8.1-1
7b2bfbe
- Update to 0.8.1
7b2bfbe
9432920
* Sat Mar 18 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-6
9432920
- Update linker script for PPC
9432920
9432920
* Sat Mar 18 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-5
9432920
- Just drop $RPM_OPT_FLAGS. They're too much of a PITA
9432920
9432920
* Sat Mar 18 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-4
9432920
- Disable stack-protector options which gcc 3.2 doesn't like
9432920
9f8ef0c
* Fri Mar 17 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-3
9f8ef0c
- Use -mcpu= instead of -mtune= on x86_64 too
9f8ef0c
- Disable SPARC targets on x86_64, because dyngen doesn't like fnegs
9f8ef0c
bf44302
* Fri Mar 17 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-2
bf44302
- Don't use -mtune=pentium4 on i386. GCC 3.2 doesn't like it
bf44302
a08e53e
* Fri Mar 17 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-1
a08e53e
- Update to 0.8.0
a08e53e
- Resort to using compat-gcc-32
a08e53e
- Enable ALSA
a08e53e
a08e53e
* Mon May 16 2005 David Woodhouse <dwmw2@infradead.org> 0.7.0-2
66db2b3
- Proper fix for GCC 4 putting 'blr' or 'ret' in the middle of the function,
66db2b3
  for i386, x86_64 and PPC.
66db2b3
a08e53e
* Sat Apr 30 2005 David Woodhouse <dwmw2@infradead.org> 0.7.0-1
9b980ed
- Update to 0.7.0
9b980ed
- Fix dyngen for PPC functions which end in unconditional branch
9b980ed
e4c6058
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
e4c6058
- rebuilt
e4c6058
c8e4b31
* Sun Feb 13 2005 David Woodhouse <dwmw2@infradead.org> 0.6.1-2
c8e4b31
- Package cleanup
c8e4b31
5c37348
* Sun Nov 21 2004 David Woodhouse <dwmw2@redhat.com> 0.6.1-1
5c37348
- Update to 0.6.1
5c37348
5c37348
* Tue Jul 20 2004 David Woodhouse <dwmw2@redhat.com> 0.6.0-2
5c37348
- Compile fix from qemu CVS, add x86_64 host support
5c37348
5c37348
* Mon May 12 2004 David Woodhouse <dwmw2@redhat.com> 0.6.0-1
5c37348
- Update to 0.6.0.
5c37348
5c37348
* Sat May 8 2004 David Woodhouse <dwmw2@redhat.com> 0.5.5-1
5c37348
- Update to 0.5.5.
5c37348
5c37348
* Thu May 2 2004 David Woodhouse <dwmw2@redhat.com> 0.5.4-1
5c37348
- Update to 0.5.4.
5c37348
5c37348
* Thu Apr 22 2004 David Woodhouse <dwmw2@redhat.com> 0.5.3-1
5c37348
- Update to 0.5.3. Add init script.
5c37348
5c37348
* Thu Jul 17 2003 Jeff Johnson <jbj@redhat.com> 0.4.3-1
5c37348
- Create.