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
4cf268e
Version: 0.9.0
b63773c
Release: 4%{?dist}
6e8d2af
License: GPLv2+, 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
9432920
Patch1: qemu-0.8.0-sdata.patch
76b47ee
Patch2: qemu-0.9.0-load-initrd.patch
6e8d2af
# Fix RTL8139 MMIO regions. Remove at next upgrade
6e8d2af
Patch5: qemu-0.9.0-rtl8139-mmio-regions.patch
6e8d2af
# Fix Atapi errors with latest kernel
6e8d2af
Patch6: qemu-0.9.0-atapi-hsm.patch
6e8d2af
# Fix RTL8139 checksum calculations for Vista
6e8d2af
Patch7: qemu-0.9.0-rtl8139-checksum.patch
b63773c
Patch8: qemu-%{version}-block-rw-range-check.patch
1ca9271
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e6d232d
BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html
67348d7
Requires(post): /sbin/chkconfig
67348d7
Requires(preun): /sbin/service /sbin/chkconfig
67348d7
Requires(postun): /sbin/service
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
5c37348
%prep
5c37348
%setup -q
c8e4b31
%patch0 -p1
9432920
%patch1 -p1
76b47ee
%patch2 -p0
6e8d2af
%patch5 -p1
6e8d2af
%patch6 -p1
6e8d2af
%patch7 -p0
b63773c
%patch8 -p1
5c37348
5c37348
%build
e6d232d
./configure \
e6d232d
    --prefix=%{_prefix} \
e6d232d
    --interp-prefix=%{_prefix}/qemu-%%M \
e6d232d
    --cc=gcc%{gccver} \
e6d232d
    --enable-alsa
67348d7
make %{?_smp_mflags}
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
c8e4b31
%config %{_sysconfdir}/rc.d/init.d/qemu
67348d7
%{_bindir}/qemu*
67348d7
%{_prefix}/share/qemu/
67348d7
%{_mandir}/man1/*
5c37348
5c37348
%changelog
b63773c
* Sat Feb 23 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-4.fc7
b63773c
- Fix block device extents check (rhbz #433560)
b63773c
6e8d2af
* Wed Sep 26 2007 Daniel P. Berrange <berrange@redhat.com> - 0.9.0-3.fc7
6e8d2af
- Update licence
6e8d2af
- Fix CDROM emulation (rhbz #253542)
6e8d2af
- Fix rtl8139 mmio region mappings with multiple NICs
6e8d2af
- Fix rtl8139 checksum calculation for Vista (rhbz #308201)
6e8d2af
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.