%define efi_support 0 %ifarch %{ix86} %define _host_cpu i386 %else %define _host_cpu %{_arch} %endif %define defshell defaultmenu.sh Summary: grub - a Multiboot boot loader. Summary(ja): grub - マルチブートローダ Name: grub Version: 0.97 Release: 4%{?_dist_release} License: GPL Group: System Environment/Base URL: http://www.gnu.org/software/grub/ Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz Source1: %{defshell} # http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary Patch1: grub-fedora-15.patch #Patch10: grub-0.97-prototypes.patch #Patch100: ext3_256byte_inode.diff #Patch110: grub-0.97-ext4-support.patch #Patch120: grub-0.97-build-id=none.patch #Patch130: grub-0.97-tinfo.patch ExclusiveArch: %{ix86} x86_64 BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires(post): install-info, sed, grep, coreutils Requires(preun): install-info Requires: mktemp BuildRequires: ncurses-devel >= 5.6 BuildRequires: glibc-static %ifarch x86_64 BuildRequires: compat32-glibc-devel BuildRequires: compat32-glibc-static %endif %description GNU GRUB is a Multiboot boot loader. It was derived from GRUB, GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. Briefly, bootloader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software (such as the Hurd or the Linux). The kernel, in turn, initializes the rest of the operating system (usually GNU). %description -l ja GNU GRUB はマルチブートローダです。 この名前は GRand Unified Bootloader (壮大な 統一されたブート ローダ) に由来し、元来は Erich Stefan Boleyn によって、設計・ 実装されたものです。 手短に言えば、ブートローダとはコンピュータが起動する際に最初 に実行されるプログラムで、(Hurd や Linux のような) オペレー ティングシステムのカーネルをディスクから読み込んで制御を渡す 作業を担当します。カーネルは、それを受けて、オペレーティング システムの他の部分 (通常は GNU) を初期化します。 %prep %setup -q %patch1 -p1 -b .fedora #%patch10 -p1 -b .prototypes #%patch100 -p1 -b .ext3_256byte_inode #%patch110 -p1 -b .ext4 #%patch120 -p1 -b .build-id #%patch130 -p1 -b .ncurses5 # Modify grub to show the full version number sed -i 's/0\.97/%{version}-%{release}/' configure.in %build autoreconf autoconf GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1) CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused" if [ "$GCCVERS" == "4" ]; then CFLAGS="$CFLAGS -Wno-pointer-sign" fi export CFLAGS %if %{efi_support} %configure --sbindir=/sbin \ --disable-auto-linux-mem-opt --with-platform=efi %__make mv efi/grub.efi . make clean %endif CFLAGS="$CFLAGS -static" %configure --sbindir=/sbin \ --disable-auto-linux-mem-opt %__make %install rm -rf $RPM_BUILD_ROOT %makeinstall sbindir=${RPM_BUILD_ROOT}/sbin mkdir -p ${RPM_BUILD_ROOT}/boot/grub %if %{efi_support} mkdir -m 0755 -p ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/ install -m 755 grub.efi ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/grub.efi %endif %{__install} -p -m 644 docs/menu.lst %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor} %{__install} -p -m 744 %{SOURCE1} %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor} # create compat links mkdir -p ${RPM_BUILD_ROOT}/%{_sbindir} for i in grub grub-install grub-set-default grub-md5-crypt grub-terminfo ;do ln -sf ../../sbin/$i ${RPM_BUILD_ROOT}/%{_sbindir}/$i done mkdir -p ${RPM_BUILD_ROOT}/%{_libdir} mv ${RPM_BUILD_ROOT}/%{_datadir}/grub ${RPM_BUILD_ROOT}/%{_libdir}/grub ln -sf ../%{_lib}/grub ${RPM_BUILD_ROOT}/%{_datadir}/grub rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_infodir}/grub.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/multiboot.info.gz %{_infodir}/dir %{_datadir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell} %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/grub.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/multiboot.info.gz %{_infodir}/dir fi %files %defattr(-,root,root) %doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE /boot/grub %if %{efi_support} %attr(0755,root,root) /boot/efiu/EFI/vine %endif %{_syssbindir}/* %{_sbindir}/* %{_bindir}/* %{_datadir}/grub %{_libdir}/grub %{_infodir}/*.info* %{_mandir}/man*/* %changelog * Fri May 27 2011 Daisuke SUZUKI 0.97-4 - switch to grub-fedora.git to support new features (ext4/efi/...) * Wed Mar 23 2011 Daisuke SUZUKI 0.97-3 - add Patch110 to support ext4 filesystem - add Patch120 to build with current binutils - add Patch130 to build with ncurses-5.6 - add R(post): install-info, grep, sed, coreutils - add R(preun): install-info - add BR: compat32-glibc-{devel,static} for x86_64 - add BR: glibc-static * Wed Jan 21 2009 Daisuke SUZUKI 0.97-2 - add patch100 to support newer e2fsprogs * Fri Aug 15 2008 Shu KONNO 0.97-1vl5 - applied new versioning policy, spec in utf-8 * Tue May 22 2007 Daisuke SUZUKI 0.97-0vl8 - fix _host_cpu trick * Tue May 22 2007 Daisuke SUZUKI 0.97-0vl7 - add x86_64 to ExclusiveArch: - add BuildRequires: compat32-glibc-devel for x86_64 - add "-static" to CFLAGS for x86_64 - use special CFLAGS - add Patch10 to run configure with new binutils * Thu Sep 07 2006 Daisuke SUZUKI 0.97-0vl6 - add PreReq: grep, sed for defaultmenu.sh * Tue Sep 5 2006 KANEKO Seiji 0.97-0vl5 - add initrd in menu.lst file created by defaultmenu.sh * Thu Jun 26 2006 KANEKO Seiji 0.97-0vl4 - fix date of previous changelog entry - escape macro of past changelog entries - change Source1: menu.lst.vine to defautmenu.sh - invoke defaultmenu.sh on %%post scriptlet * Thu Jun 21 2006 KANEKO Seiji 0.97-0vl3 - remove Requires: ncurses, gpm, bash * Thu May 12 2005 KANEKO Seiji 0.97-0vl2 - upstream release - add MAINTENANCE to %%doc - drop Patch0 (merged in upstream source) * Sun Mar 20 2005 KANEKO Seiji 0.96-0vl3 - savedefault patch from upstream CVS: http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/stage2/stage2.c.diff?r1=1.45&r2=1.46&diff_format=u stage2/stage2.c (cmain): Initialize DEFAULT_FILE to an empty string. Reported by NATORI Shin . * Sun Feb 20 2005 KANEKO Seiji 0.96-0vl2 - upstream release - drop Patch0 (merged) - added sample file /usr/lib/grub/i386-pc/menu.lst.vine - change installation destination of menu.lst from %%datadir to %%libdir * Wed Jan 19 2005 KANEKO Seiji 0.95-0vl3 - applied Patch0 from upstream CVS: http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/util/grub-install.in.diff?r1=1.46&r2=1.47&diff_format=u util/grub-install.in (convert): Fix the sed statement for Linux. The expression was ambigious in some cases. * Wed Aug 18 2004 KANEKO Seiji 0.95-0vl2 - catch up to upstream release - delete %%_target_platform macro - delete gzip info files from %%install macro - add BuildRequires: ncurses-devel - add Requires: ncurses, gpm, mktemp, bash - add PreReq: install-info - %%configure with --disable-auto-linux-mem-opt option * Thu Jul 12 2001 - 0.90-0vl1: %%configure with a trick for _host_cpu, %%makeinstall * Tue Apr 24 2001 - 0.5.96-0vl1: use some macros * Wed Oct 11 2000 Yoshihiro Kajiki [0vl2] - build for Vine 2.1beta * Tue Oct 10 2000 Yoshihiro Kajiki [0vl1] - update to 0.5.95 and build for Vine 2.0 - add Japanese summary and description - based on grub-0.5.94-2, Kondara Zoo * Sun Jun 4 2000 AYUHANA Tomonori * /usr/doc/grub-*/menu.lst -> /usr/share/grub/i386-pc/menu.lst * Thu May 18 2000 AYUHANA Tomonori - upgrade to 0.5.93.1 to 0.5.94