render / rpms / edk2

Forked from rpms/edk2 3 months ago
Clone

Blame edk2.spec

Paolo Bonzini 9f191d
%define SVNDATE 20130515
Paolo Bonzini 9f191d
%define SVNREV  14365
Paolo Bonzini 9f191d
Kay Sievers bf879e
%ifarch %{ix86}
Kay Sievers bf879e
%global machine_type_name ia32
Kay Sievers bf879e
%global edk2_build_arch   IA32
Kay Sievers bf879e
%endif
Kay Sievers bf879e
%ifarch x86_64
Kay Sievers bf879e
%global machine_type_name x64
Kay Sievers bf879e
%global edk2_build_arch   X64
Kay Sievers bf879e
%endif
Kay Sievers bf879e
Paolo Bonzini 9f191d
# More subpackages to come once licensing issues are fixed
Paolo Bonzini 9f191d
Name:		edk2
Paolo Bonzini 9f191d
Version:	%{SVNDATE}svn%{SVNREV}
Kay Sievers a1a88e
Release:	5%{?dist}
Paolo Bonzini 9f191d
Summary:	EFI Development Kit II
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
# There are no formal releases from upstream.
Paolo Bonzini 9f191d
# Tarballs are created with:
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
# svn export -r ${SVNREV} \
Paolo Bonzini 9f191d
#     https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2 edk2-r${SVNREV}
Paolo Bonzini 9f191d
# rm -rf edk2-r${SVNREV}/BaseTools/Bin
Paolo Bonzini 9f191d
# rm -rf edk2-r${SVNREV}/ShellBinPkg
Paolo Bonzini 9f191d
# rm -rf edk2-r${SVNREV}/FatBinPkg
Paolo Bonzini 9f191d
# tar -cv edk2-r${SVNREV} | xz -6 > edk2-r${SVNREV}.tar.xz
Paolo Bonzini 9f191d
Source0:	edk2-r%{SVNREV}.tar.xz
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
License:	BSD
Paolo Bonzini 9f191d
Group:		Applications/Emulators
Paolo Bonzini 9f191d
URL:		http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK2
Paolo Bonzini 9f191d
Kay Sievers bf879e
# We need to build tools on ARM, but how is still an open question
Kay Sievers bf879e
# https://bugzilla.redhat.com/show_bug.cgi?id=992180
Kay Sievers bf879e
ExclusiveArch:	%{ix86} x86_64
Dan Horák 151636
Paolo Bonzini 9f191d
BuildRequires:	python2-devel
Paolo Bonzini 9f191d
BuildRequires:	libuuid-devel
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
Requires:	edk2-tools%{?_isa} = %{version}-%{release}
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%description
Kay Sievers bf879e
EDK II is a development code base for creating UEFI drivers, applications
Kay Sievers bf879e
and firmware images.
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%package tools
Paolo Bonzini 9f191d
Summary:	EFI Development Kit II Tools
Paolo Bonzini 9f191d
Group:		Development/Tools
Paolo Bonzini 9f191d
Requires:	edk2-tools-python = %{version}-%{release}
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%description tools
Paolo Bonzini 9f191d
This package provides tools that are needed to
Paolo Bonzini 9f191d
build EFI executables and ROMs using the GNU tools.
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%package tools-python
Paolo Bonzini 9f191d
Summary:	EFI Development Kit II Tools
Paolo Bonzini 9f191d
Group:		Development/Tools
Paolo Bonzini 9f191d
Requires:	python
Paolo Bonzini 9f191d
BuildArch:      noarch
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%description tools-python
Paolo Bonzini 9f191d
This package provides tools that are needed to build EFI executables
Paolo Bonzini 9f191d
and ROMs using the GNU tools.  You do not need to install this package;
Paolo Bonzini 9f191d
you probably want to install edk2-tools only.
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%package tools-doc
Paolo Bonzini 9f191d
Summary:	Documentation for EFI Development Kit II Tools
Paolo Bonzini 9f191d
Group:		Development/Tools
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%description tools-doc
Paolo Bonzini 9f191d
This package documents the tools that are needed to
Paolo Bonzini 9f191d
build EFI executables and ROMs using the GNU tools.
Paolo Bonzini 9f191d
Kay Sievers a1a88e
%package shell
Kay Sievers a1a88e
Summary: UEFI 2.0 Shell
Kay Sievers a1a88e
Kay Sievers a1a88e
%description shell
Kay Sievers a1a88e
The shell provides a standard pre-boot command line
Kay Sievers a1a88e
processor to run on top of a UEFI 2.0 firmware.
Kay Sievers a1a88e
Paolo Bonzini 9f191d
%prep
Paolo Bonzini 9f191d
%setup -q -n %{name}-r%{SVNREV}
Kay Sievers a1a88e
# remove non-working compiler option
Kay Sievers a1a88e
sed -i 's/ -m *elf_x86_64//' BaseTools/Conf/tools_def.template
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%build
Kay Sievers a1a88e
make -C BaseTools
Paolo Bonzini 9f191d
source ./edksetup.sh
Kay Sievers bf879e
build -a %{edk2_build_arch} -b RELEASE -p ShellPkg/ShellPkg.dsc -t GCC46
Paolo Bonzini 9f191d
2ffbb0
# Build is broken if MAKEFLAGS contains -j option.
2ffbb0
unset MAKEFLAGS
Paolo Bonzini 9f191d
make -C $WORKSPACE/BaseTools
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%install
Paolo Bonzini 9f191d
mkdir -p %{buildroot}%{_bindir}
Paolo Bonzini 9f191d
install	\
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/BootSectImage \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/EfiLdrImage \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/EfiRom \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenCrc32 \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenFfs \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenFv \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenFw \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenPage \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenSec \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GenVtf \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/GnuGenBootSector \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/LzmaCompress \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/Split \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/VfrCompile \
Paolo Bonzini 9f191d
	BaseTools/Source/C/bin/VolInfo \
Paolo Bonzini 9f191d
	%{buildroot}%{_bindir}
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
ln -f %{buildroot}%{_bindir}/GnuGenBootSector \
Paolo Bonzini 9f191d
	%{buildroot}%{_bindir}/GenBootSector
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
mkdir -p %{buildroot}%{_datadir}/%{name}
Paolo Bonzini 9f191d
cp -R BaseTools/Source/Python %{buildroot}%{_datadir}/%{name}/Python
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
find %{buildroot}%{_datadir}/%{name}/Python -name "*.pyd" | xargs rm
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
for i in BPDG GenDepex GenFds GenPatchPcdTable PatchPcdValue TargetTool Trim UPT; do
Paolo Bonzini 9f191d
  echo '#!/bin/sh
Paolo Bonzini 9f191d
PYTHONPATH=%{_datadir}/%{name}/Python
Paolo Bonzini 9f191d
export PYTHONPATH
Paolo Bonzini 9f191d
exec python '%{_datadir}/%{name}/Python/$i/$i.py' "$@"' > %{buildroot}%{_bindir}/$i
Paolo Bonzini 9f191d
  chmod +x %{buildroot}%{_bindir}/$i
Paolo Bonzini 9f191d
done
Paolo Bonzini 9f191d
Kay Sievers a1a88e
mkdir -p %{buildroot}%{_prefix}/lib/efi-shell
Kay Sievers bf879e
install -m 0755 -D Build/Shell/RELEASE_GCC46/%{edk2_build_arch}/Shell.efi \
Kay Sievers bf879e
  %{buildroot}%{_prefix}/lib/efi-shell/shell%{machine_type_name}.efi
Kay Sievers a1a88e
Paolo Bonzini 9f191d
%files tools
Paolo Bonzini 9f191d
%{_bindir}/BootSectImage
Paolo Bonzini 9f191d
%{_bindir}/EfiLdrImage
Paolo Bonzini 9f191d
%{_bindir}/EfiRom
Paolo Bonzini 9f191d
%{_bindir}/GenBootSector
Paolo Bonzini 9f191d
%{_bindir}/GenCrc32
Paolo Bonzini 9f191d
%{_bindir}/GenFfs
Paolo Bonzini 9f191d
%{_bindir}/GenFv
Paolo Bonzini 9f191d
%{_bindir}/GenFw
Paolo Bonzini 9f191d
%{_bindir}/GenPage
Paolo Bonzini 9f191d
%{_bindir}/GenSec
Paolo Bonzini 9f191d
%{_bindir}/GenVtf
Paolo Bonzini 9f191d
%{_bindir}/GnuGenBootSector
Paolo Bonzini 9f191d
%{_bindir}/LzmaCompress
Paolo Bonzini 9f191d
%{_bindir}/Split
Paolo Bonzini 9f191d
%{_bindir}/VfrCompile
Paolo Bonzini 9f191d
%{_bindir}/VolInfo
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%files tools-python
Paolo Bonzini 9f191d
%{_bindir}/BPDG
Paolo Bonzini 9f191d
%{_bindir}/GenDepex
Paolo Bonzini 9f191d
%{_bindir}/GenFds
Paolo Bonzini 9f191d
%{_bindir}/GenPatchPcdTable
Paolo Bonzini 9f191d
%{_bindir}/PatchPcdValue
Paolo Bonzini 9f191d
%{_bindir}/TargetTool
Paolo Bonzini 9f191d
%{_bindir}/Trim
Paolo Bonzini 9f191d
%{_bindir}/UPT
Paolo Bonzini 9f191d
%{_datadir}/%{name}/Python/
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
%files tools-doc
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/BootSectImage_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/EfiLdrImage_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/EfiRom_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenBootSector_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenCrc32_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenDepex_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenFds_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenFfs_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenPage_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenPatchPcdTable_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/PatchPcdValue_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/SplitFile_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/TargetTool_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/Trim_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/VfrCompiler_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
%doc BaseTools/UserManuals/VolInfo_Utility_Man_Page.rtf
Paolo Bonzini 9f191d
Kay Sievers a1a88e
%files shell
Kay Sievers a1a88e
%dir %{_prefix}/lib/efi-shell
Kay Sievers bf879e
%{_prefix}/lib/efi-shell/shell%{machine_type_name}.efi
Kay Sievers a1a88e
Paolo Bonzini 9f191d
%changelog
Kay Sievers a1a88e
* Mon Aug 19 2013 Kay Sievers <kay@redhat.com> - 20130515svn14365-5
Kay Sievers a1a88e
- Add sub-package with EFI shell
Kay Sievers a1a88e
e144da
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20130515svn14365-4
e144da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e144da
Dan Horák 151636
* Thu May 23 2013 Dan Horák <dan[at]danny.cz> 20130515svn14365-3
Dan Horák 151636
- set ExclusiveArch
Dan Horák 151636
Paolo Bonzini 9f191d
* Thu May 16 2013 Paolo Bonzini <pbonzini@redhat.com> 20130515svn14365-2
Paolo Bonzini 9f191d
- Fix edk2-tools-python Requires
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
* Wed May 15 2013 Paolo Bonzini <pbonzini@redhat.com> 20130515svn14365-1
Paolo Bonzini 9f191d
- Split edk2-tools-doc and edk2-tools-python
Paolo Bonzini 9f191d
- Fix Python BuildRequires
Paolo Bonzini 9f191d
- Remove FatBinPkg at package creation time.
Paolo Bonzini 9f191d
- Use fully versioned dependency.
Paolo Bonzini 9f191d
- Add comment on how to generate the sources.
Paolo Bonzini 9f191d
Paolo Bonzini 9f191d
* Thu May 2 2013 Paolo Bonzini <pbonzini@redhat.com> 20130502.g732d199-1
Paolo Bonzini 9f191d
- Create.