Glauber Costa e3ff176
Name:		openbios
Glauber Costa e3ff176
Version:	1.0
b95155a
Release:	1%{?dist}
Glauber Costa e3ff176
Summary:	OpenBios implementation of IEEE 1275-1994
Glauber Costa e3ff176
Group:		Applications/Emulators
Glauber Costa e3ff176
License:	GPLv2
Glauber Costa e3ff176
URL:		http://www.openfirmware.info/OpenBIOS
Glauber Costa e3ff176
# Getting openbios tarball:
20374ef
# svn export -r463 svn://openbios.org/openbios/trunk/openbios-devel openbios-1.0
Glauber Costa e3ff176
# tar czvf openbios-1.0.tar.gz openbios-1.0
Glauber Costa e3ff176
Source0:	%{name}/%{name}-%{version}.tar.gz
Glauber Costa e3ff176
Patch0:		openbios-noerror.patch
b95155a
Patch1:		openbios-1.0-merge-sbss-into-bss.patch
Glauber Costa e3ff176
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Glauber Costa e3ff176
BuildRequires:	libxslt
Glauber Costa e3ff176
Glauber Costa e3ff176
# debugging firmwares does not goes the same way as a normal program.
Glauber Costa e3ff176
# moreover, all architectures providing debuginfo for a single noarch
Glauber Costa e3ff176
# package is currently clashing in koji, so don't bother.
Glauber Costa e3ff176
%global debug_package %{nil}
Glauber Costa e3ff176
%define _binaries_in_noarch_packages_terminate_build 0
Glauber Costa e3ff176
Glauber Costa e3ff176
%define ob_desc \
Glauber Costa e3ff176
The OpenBIOS project provides you with most free and open source Open Firmware	\
Glauber Costa e3ff176
implementations available. Here you find several implementations of		\
Glauber Costa e3ff176
IEEE 1275-1994 (Referred to as Open Firmware) compliant firmware. Among its	\
Glauber Costa e3ff176
features, Open Firmware provides an instruction set independent device 		\
Glauber Costa e3ff176
interface. This can be used to boot the operating system from expansion cards	\
Glauber Costa e3ff176
without	native initialization code.						\
Glauber Costa e3ff176
\
Glauber Costa e3ff176
It is Open Firmware's goal to work on all common platforms, like x86, AMD64,	\
Glauber Costa e3ff176
PowerPC, ARM and Mips. With its flexible and modular design, Open Firmware	\
Glauber Costa e3ff176
targets servers, workstations and embedded systems, where a sane and unified	\
Glauber Costa e3ff176
firmware is a crucial design goal and reduces porting efforts noticably.	\
Glauber Costa e3ff176
\
Glauber Costa e3ff176
Open Firmware is found on many servers and workstations and there are sever	\
Glauber Costa e3ff176
commercial implementations from SUN, Firmworks, CodeGen, Apple, IBM and others. \
Glauber Costa e3ff176
\
Glauber Costa e3ff176
In most cases, the Open Firmware implementations provided on this site rely on	\
Glauber Costa e3ff176
an additional low-level firmware for hardware initialization, such as coreboot	\
Glauber Costa e3ff176
or U-Boot.									\
Glauber Costa e3ff176
										\
Glauber Costa e3ff176
Glauber Costa e3ff176
%description %{ob_desc}
Glauber Costa e3ff176
Glauber Costa e3ff176
# building firmwares are quite tricky, because they often has to be built on
Glauber Costa e3ff176
# their native architecture (or in a cross-capable compiler, that we lack in
Glauber Costa e3ff176
# koji), and deployed everywhere. Recent koji builders support a feature
Glauber Costa e3ff176
# that allow us to build packages in a single architecture, and create noarch
Glauber Costa e3ff176
# subpackages that will be deployed everywhere. Because the package can only
Glauber Costa e3ff176
# be built in certain architectures, the main package has to use 
Glauber Costa e3ff176
# BuildArch: <nativearch>, or something like that.
Glauber Costa e3ff176
# Note that using ExclusiveArch is _wrong_, because it will prevent the noarch
Glauber Costa e3ff176
# packages from getting into the excluded repositories.
Glauber Costa e3ff176
#
Glauber Costa e3ff176
# Openbios is even trickier compared to other firmwares, because the same
Glauber Costa e3ff176
# source must originate firmwares for multiple architectures. The magic here
Glauber Costa e3ff176
# is to only create the subpackages in the architectures that can build it.
Glauber Costa e3ff176
%ifarch sparcv9
Glauber Costa e3ff176
%package sparc
Glauber Costa e3ff176
Summary: OpenBIOS for sparc
Glauber Costa e3ff176
BuildArch: noarch
Glauber Costa e3ff176
Requires: %{name}-common = %{version}-%{release}
Glauber Costa e3ff176
Glauber Costa e3ff176
%description sparc %{ob_desc}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch sparc64
Glauber Costa e3ff176
%package sparc64
Glauber Costa e3ff176
Summary: OpenBIOS for sparc64
Glauber Costa e3ff176
BuildArch: noarch
Glauber Costa e3ff176
Requires: %{name}-common = %{version}-%{release}
Glauber Costa e3ff176
Glauber Costa e3ff176
%description sparc64 %{ob_desc}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch ppc ppc64
Glauber Costa e3ff176
%package ppc
Glauber Costa e3ff176
Summary: OpenBIOS for ppc
Glauber Costa e3ff176
BuildArch: noarch
Glauber Costa e3ff176
Requires: %{name}-common = %{version}-%{release}
Glauber Costa e3ff176
Glauber Costa e3ff176
%description ppc %{ob_desc}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%package common
Glauber Costa e3ff176
Summary: Common files for OpenBIOS
Glauber Costa e3ff176
BuildArch: noarch
Glauber Costa e3ff176
Glauber Costa e3ff176
%description common %{ob_desc}
Glauber Costa e3ff176
%prep
Glauber Costa e3ff176
Glauber Costa e3ff176
%setup -q
Glauber Costa e3ff176
%patch0 -p1
b95155a
%patch1 -p1
Glauber Costa e3ff176
Glauber Costa e3ff176
%build
Glauber Costa e3ff176
Glauber Costa e3ff176
CFLAGS="%{optflags}"
Glauber Costa e3ff176
%ifarch ppc 
Glauber Costa e3ff176
/bin/sh ./config/scripts/switch-arch ppc
Glauber Costa e3ff176
make build-verbose %{?_smp_mflags}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch sparcv9
Glauber Costa e3ff176
/bin/sh ./config/scripts/switch-arch sparc32
Glauber Costa e3ff176
make build-verbose %{?_smp_mflags}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch sparc64
Glauber Costa e3ff176
/bin/sh ./config/scripts/switch-arch sparc64
Glauber Costa e3ff176
make build-verbose %{?_smp_mflags}
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%install
Glauber Costa e3ff176
rm -rf $RPM_BUILD_ROOT
Glauber Costa e3ff176
mkdir -p $RPM_BUILD_ROOT%{_datadir}/openbios
Glauber Costa e3ff176
%ifarch sparcv9
Glauber Costa e3ff176
install -p -m 0644  obj-sparc32/openbios-builtin.elf $RPM_BUILD_ROOT%{_datadir}/openbios/openbios-sparc32
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
%ifarch sparc64
Glauber Costa e3ff176
install -p -m 0644  obj-sparc64/openbios-builtin.elf $RPM_BUILD_ROOT%{_datadir}/openbios/openbios-sparc64
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
%ifarch ppc 
Glauber Costa e3ff176
install -p -m 0644  obj-ppc/openbios-qemu.elf $RPM_BUILD_ROOT%{_datadir}/openbios/openbios-ppc
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
Glauber Costa e3ff176
%clean
Glauber Costa e3ff176
rm -rf $RPM_BUILD_ROOT
Glauber Costa e3ff176
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch sparcv9
Glauber Costa e3ff176
%files sparc
Glauber Costa e3ff176
%defattr(-,root,root,-)
Glauber Costa e3ff176
%{_datadir}/openbios/openbios-sparc32
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch sparc64
Glauber Costa e3ff176
%files sparc64
Glauber Costa e3ff176
%defattr(-,root,root,-)
Glauber Costa e3ff176
%{_datadir}/openbios/openbios-sparc64
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%ifarch ppc
Glauber Costa e3ff176
%files ppc
Glauber Costa e3ff176
%defattr(-,root,root,-)
Glauber Costa e3ff176
%{_datadir}/openbios/openbios-ppc
Glauber Costa e3ff176
%endif
Glauber Costa e3ff176
Glauber Costa e3ff176
%files common
Glauber Costa e3ff176
%defattr(-,root,root,-)
Glauber Costa e3ff176
%dir %{_datadir}/openbios/
Glauber Costa e3ff176
%doc COPYING README
Glauber Costa e3ff176
Glauber Costa e3ff176
Glauber Costa e3ff176
%changelog
b95155a
* Thu May 21 2009 Mark McLoughlin <markmc@redhat.com> - 1.0-1
b95155a
- Replace previous attempt to fix bug #494075 with fix from Pavel Roskin
b95155a
- Drop the 0.x.463 numbering; we are using official upstream 1.0
b95155a
b95155a
* Tue Apr 14 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.6.463
Glauber Costa b2458ad
- Applied bugfix for #494075
Glauber Costa b2458ad
b95155a
* Wed Mar 04 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.5.463
Glauber Costa e3ff176
- created openbios-common instead of openbios-doc. It owns the directories
Glauber Costa e3ff176
  and everybody depends on it.
Glauber Costa e3ff176
b95155a
* Wed Mar 04 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.4.463
Glauber Costa e3ff176
- Addressed comments on BZ 485420. rpmlint provides no error for me,
Glauber Costa e3ff176
  added comentaries, and tell how to get the source.
Glauber Costa e3ff176
b95155a
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.3.463
Glauber Costa e3ff176
- Don't use prebuilt binaries anywhere.
Glauber Costa e3ff176
Glauber Costa e3ff176
* Fri Feb 13 2009 Glauber Costa <glommer@redhat.com> - 1.0.0.2
Glauber Costa e3ff176
- Addressed comments on BZ 485420: clean build environment, own
Glauber Costa e3ff176
  directories we create.
b95155a
* Fri Feb 13 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.1.463
Glauber Costa e3ff176
- Created initial build for sparc32/sparc64