ea3c68
%if 0%{?fedora}
ea3c68
%define cross 1
ea3c68
%endif
ea3c68
ea3c68
%global hash cbaee52
ea3c68
%global date 20170427
ea3c68
ea3c68
ea3c68
Name:           sgabios
ea3c68
Epoch:          1
ea3c68
Version:        0.%{date}git
ea3c68
Release:        2%{?dist}
ea3c68
Summary:        Serial graphics BIOS option rom
ea3c68
ea3c68
Group:          Applications/Emulators
ea3c68
License:        ASL 2.0
ea3c68
URL:            https://github.com/qemu/sgabios
ea3c68
# There are no upstream releases.  This archive is prepared as follows:
ea3c68
#
ea3c68
# git clone https://github.com/qemu/sgabios
ea3c68
# cd sgabios
ea3c68
# hash=`git log -1 --format='%h'`
ea3c68
# date=`git log -1 --format='%cd' --date=short | tr -d -`
ea3c68
# git archive --prefix sgabios-${date}-git${hash}/ ${hash} | xz -7e > ../openbios-${date}-git${hash}.tar.xz
ea3c68
Source0:        sgabios-%{date}-git%{hash}.tar.xz
ea3c68
Patch0:         sgabios-hostcc.patch
ea3c68
ea3c68
%if 0%{?cross}
ea3c68
BuildRequires:  binutils-x86_64-linux-gnu gcc-x86_64-linux-gnu
ea3c68
Buildarch: noarch
ea3c68
%else
ea3c68
ExclusiveArch: %{ix86} x86_64
ea3c68
%endif
ea3c68
ea3c68
Requires: %{name}-bin = %{epoch}:%{version}-%{release}
ea3c68
ea3c68
# Sgabios is noarch, but required on architectures which cannot build it.
ea3c68
# Disable debuginfo because it is of no use to us.
ea3c68
%global debug_package %{nil}
ea3c68
ea3c68
%description
ea3c68
SGABIOS is designed to be inserted into a BIOS as an option rom to provide over
ea3c68
a serial port the display and input capabilities normally handled by a VGA
ea3c68
adapter and a keyboard, and additionally provide hooks for logging displayed
ea3c68
characters for later collection after an operating system boots.
ea3c68
ea3c68
ea3c68
%package bin
ea3c68
Summary: Sgabios for x86
ea3c68
Buildarch: noarch
ea3c68
ea3c68
%description bin
ea3c68
SGABIOS is designed to be inserted into a BIOS as an option rom to provide over
ea3c68
a serial port the display and input capabilities normally handled by a VGA
ea3c68
adapter and a keyboard, and additionally provide hooks for logging displayed
ea3c68
characters for later collection after an operating system boots.
ea3c68
ea3c68
ea3c68
%prep
ea3c68
%setup -q -n sgabios-%{date}-git%{hash}
ea3c68
%autopatch
ea3c68
ea3c68
ea3c68
%build
ea3c68
unset MAKEFLAGS
ea3c68
make \
ea3c68
        HOSTCC=gcc \
ea3c68
%if 0%{?cross}
ea3c68
        CC=x86_64-linux-gnu-gcc \
ea3c68
        AS=x86_64-linux-gnu-as \
ea3c68
        LD=x86_64-linux-gnu-ld \
ea3c68
        OBJCOPY=x86_64-linux-gnu-objcopy \
ea3c68
        OBJDUMP=x86_64-linux-gnu-objdump
ea3c68
%endif
ea3c68
ea3c68
ea3c68
%install
ea3c68
mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgabios
ea3c68
install -m 0644 sgabios.bin $RPM_BUILD_ROOT%{_datadir}/sgabios
ea3c68
ea3c68
ea3c68
%files
ea3c68
%doc COPYING design.txt
ea3c68
ea3c68
ea3c68
%files bin
ea3c68
%dir %{_datadir}/sgabios/
ea3c68
%{_datadir}/sgabios/sgabios.bin
ea3c68
ea3c68
ea3c68
%changelog
ea3c68
* Wed Jun 27 2018 Danilo de Paula <ddepaula@redhat.com> - 1:0.20170427git-2
ea3c68
- Trigger a new sgabios build
ea3c68
ea3c68
* Sun Mar 25 2018 Cole Robinson <crobinso@redhat.com> - 1:0.20170427git-1
ea3c68
- Switch to qemu sgabios repo, which has an extra bugfix
ea3c68
ea3c68
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.20110622svn-13
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ea3c68
ea3c68
* Wed Nov 22 2017 Paolo Bonzini <pbonzini@redhat.com> - 1:0.20110622svn-12
ea3c68
- Allow disabling cross-compilation
ea3c68
ea3c68
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.20110622svn-11
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ea3c68
ea3c68
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.20110622svn-10
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ea3c68
ea3c68
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.20110622svn-9
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ea3c68
ea3c68
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.20110622svn-8
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ea3c68
ea3c68
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.20110622svn-7
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ea3c68
ea3c68
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.20110622svn-6
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ea3c68
ea3c68
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.20110622svn-5
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ea3c68
ea3c68
* Thu Dec  6 2012 Peter Robinson <pbrobinson@fedoraproject.org> 1:0.20110622svn-3
ea3c68
- Root sgabios package is noarch too because it only contains docs
ea3c68
ea3c68
* Thu Oct 25 2012 Paolo Bonzini <pbonzini@redhat.com> - 1:0.20110622svn-2
ea3c68
- Cross compile (fixes bug #869876).
ea3c68
ea3c68
* Wed Oct 17 2012 Cole Robinson <crobinso@redhat.com> - 1:0.20110622svn-2
ea3c68
- Fix deps with epoch bump
ea3c68
ea3c68
* Mon Oct 15 2012 Paolo Bonzini <pbonzini@redhat.com> - 1:0.20110622svn-1
ea3c68
- Move date from release to version (requires epoch bump).
ea3c68
ea3c68
* Sun Aug 12 2012 Richard W.M. Jones <rjones@redhat.com> - 0-1.1.20110622svn
ea3c68
- Fix date in release string.
ea3c68
  NB: To make this version > than the previous, I had to use 1.1.20110622
ea3c68
  instead of 0.1.20110622, since the old second field was 20110623.
ea3c68
- Unset MAKEFLAGS, since parallel make breaks the build.
ea3c68
- Bring the spec file up to modern standards.
ea3c68
ea3c68
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.20110623SVN
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ea3c68
ea3c68
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.20110622SVN
ea3c68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ea3c68
ea3c68
* Mon Nov 21 2011 Justin M. Forbes <jforbes@redhat.com> 0.0-0.20110621SVN
ea3c68
- Updates per review.
ea3c68
ea3c68
* Tue Jun 21 2011 Justin M. Forbes <jforbes@redhat.com> 0.1-0.20110621SVN
ea3c68
- Created initial package