update svn snapshot add sparc support

This commit is contained in:
Dennis Gilmore 2009-09-12 02:25:07 +00:00
parent b08b8677c4
commit e0466312bc
2 changed files with 41 additions and 62 deletions

View file

@ -1,80 +1,52 @@
# Modules always contain just 32-bit code
%define _libdir %{_exec_prefix}/lib
# 64bit machines use 32bit boot loader
# 64bit intel machines use 32bit boot loader
# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then)
%ifarch x86_64
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
%endif
# Hack to include debuginfo for files, that find-debuginfo.sh wouldn't
# have spot, because they're either no longer ELF images, such as
# boot images, or are brutally and insensitively stripped, such as
# modules. See %%install.
# It's certainly not the nicest thing you've ever seen.
# THAT IS NOT MY FAULT.
# We do not use find-debuginfo.sh -o here, as it's not supported in RHEL5
%define __debug_install_post \
\
# Gather debuginfo as usual \
/usr/lib/rpm/find-debuginfo.sh \\\
%{_builddir}/%{?buildsubdir} \
mv debugfiles.list debug1.list \
\
# Gather debuginfo of modules from shadow build root \
RPM_BUILD_ROOT=%{_builddir}/%{?buildsubdir}/.debugroot \\\
/usr/lib/rpm/find-debuginfo.sh \\\
%{_builddir}/%{?buildsubdir} \
mv debugfiles.list debug2.list \
\
# Merge debuginfos \
cp -a %{_builddir}/%{?buildsubdir}/.debugroot/usr/lib/debug \\\
$RPM_BUILD_ROOT/usr/lib \
cp -a %{_builddir}/%{?buildsubdir}/.debugroot/usr/src/debug \\\
$RPM_BUILD_ROOT/usr/src \
sort debug1.list debug2.list |uniq >debugfiles.list \
\
%{nil}
#sparc is always compile 64 bit
%ifarch %{sparc}
%define _target_platform sparc64-%{_vendor}-%{_target_os}%{?_gnu}
%endif
Name: grub2
Version: 1.98
Release: 0.6.20080827svn%{?dist}
Release: 0.6.20090911svn%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
License: GPLv3+
URL: http://www.gnu.org/software/grub/
#Source0: http://alpha.gnu.org/pub/gnu/grub/grub-%{version}.tar.gz
# svn -r1829 co svn://svn.sv.gnu.org/grub/trunk/grub2
# svn -r2587 co svn://svn.sv.gnu.org/grub/trunk/grub2
# tar czf grub2.tar.gz --exclude .svn grub2
Source0: grub2.tar.gz
Source1: 90_persistent
Source2: grub.default
Source3: README.Fedora
Patch1: grub-1.98-prototypes.patch
Patch2: grub-1.98-transform.patch
Patch4: grub-1.95-grubdir.patch
Patch5: grub-1.98-os.patch
Patch6: grub-1.97-cfgmode.patch
Patch7: grub-1.96-garbage.patch
Patch8: grub-1.98-persistent.patch
Patch9: grub-1.98-linuxsort.patch
Patch10: http://fedorapeople.org/~lkundrak/grub2/grub2-dlsym-v4.patch
#Patch13: http://fedorapeople.org/~lkundrak/grub2/grub2-preserve-symbols-v4.patch
Patch13: grub2-preserve-symbols-v4.1.patch
Patch0: grub-1.95-grubdir.patch
Patch1: http://fedorapeople.org/~lkundrak/grub2/grub2-dlsym-v4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex bison ruby binutils
BuildRequires: ncurses-devel lzo-devel
BuildRequires: freetype2-devel libusb-devel
%ifarch %{sparc}
BuildRequires: /usr/lib64/crt1.o glibc-static
%else
BuildRequires: /usr/lib/crt1.o glibc-static
%endif
BuildRequires: autoconf automake
# grubby
Requires(pre): mkinitrd
Requires(post): mkinitrd
# TODO: ppc and sparc
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{ix86} x86_64 %{sparc}
%description
This is the second version of the GRUB (Grand Unified Bootloader),
@ -92,26 +64,23 @@ file that is part of this package's documentation for more information.
%prep
%setup -q -n grub2
%patch1 -p0 -b .prototypes
%patch2 -p1 -b .transform
%patch4 -p1 -b .grubdir
%patch5 -p1 -b .os
%patch6 -p1 -b .cfgmode
%patch7 -p1 -b .garbage
%patch8 -p1 -b .persistent
%patch9 -p0 -b .linuxsort
%patch10 -p1 -b .dlsym
%patch13 -p1 -b .preserve-symbols
%patch0 -p1 -b .grubdir
%patch1 -p1 -b .dlsym
# README.Fedora
cp %{SOURCE3} .
%build
sh autogen.sh
# -static is needed so that autoconf script is able to link
# test that looks for _start symbol on 64 bit platforms
%configure TARGET_LDFLAGS=-static \
%ifarch %{sparc}
--with-platform=ieee1275 \
%else
--with-platform=pc \
%endif
--enable-grub-emu \
--program-transform-name=s,grub,%{name},
# TODO: Other platforms. Use alternatives system?
@ -120,11 +89,11 @@ cp %{SOURCE3} .
# --with-platform=i386-pc \
#make %{?_smp_mflags}
make %{?_smp_mflags}
#gcc -Inormal -I./normal -I. -Iinclude -I./include -Wall -W -DGRUB_LIBDIR=\"/usr/lib/`echo grub/i386-pc | sed 's&^&&;s,grub,grub2,'`\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DGRUB_UTIL=1 -MD -c -o grub_emu-normal_lexer.o normal/lexer.c
#In file included from normal/lexer.c:23:
#include/grub/script.h:26:29: error: grub_script.tab.h: No such file or directory
make
#make
%install
@ -151,7 +120,7 @@ do
# have both boot.img and boot.mod ...
EXT=$(echo $MODULE |grep -q '.mod' && echo '.elf' || echo '.exec')
TGT=$(echo $MODULE |sed "s,$RPM_BUILD_ROOT,.debugroot,")
install -m 755 -D $BASE$EXT $TGT
# install -m 755 -D $BASE$EXT $TGT
done
# Defaults
@ -190,28 +159,31 @@ rm -f /boot/%{name}/device.map
%triggerin -- kernel, kernel-PAE
exec >/dev/null 2>&1
# Generate grub.cfg
update-%{name}
%{name}-mkconfig
%triggerun -- kernel, kernel-PAE
exec >/dev/null 2>&1
# Generate grub.cfg
update-%{name}
%{name}-mkconfig
%files
%defattr(-,root,root,-)
%{_libdir}/%{name}
%{_libdir}/grub/
%{_sbindir}/%{name}-mkdevicemap
%{_sbindir}/%{name}-install
%{_sbindir}/%{name}-emu
%{_sbindir}/%{name}-probe
%{_sbindir}/%{name}-setup
%{_sbindir}/update-%{name}
%{_sbindir}/%{name}-dumpbios
%{_sbindir}/%{name}-mkconfig
%{_sbindir}/%{name}-ofpathname
%{_bindir}/%{name}-mkimage
%{_bindir}/%{name}-mkelfimage
%{_bindir}/%{name}-mkrescue
%{_bindir}/%{name}-editenv
%{_bindir}/%{name}-fstest
%dir %{_sysconfdir}/grub.d
%config %{_sysconfdir}/grub.d/??_*
%{_sysconfdir}/grub.d/README
@ -224,8 +196,15 @@ update-%{name}
%doc COPYING INSTALL NEWS README THANKS TODO ChangeLog README.Fedora
%exclude %{_mandir}
%{_includedir}/grub/
%{_includedir}/multiboot*.h
%changelog
* Fri Sep 11 2009 Dennis Gilmore <dennis@ausil.us - 1.9-0.6.20090911svn
- update to new svn snapshot
- add sparc support
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.98-0.6.20080827svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View file

@ -1 +1 @@
27ca6fe1350ec41ed79e31a404c055fb grub2.tar.gz
2f22e7c338fffbf44bc58cdc980eefd8 grub2.tar.gz