|
@@ -1,3 +1,5 @@
|
|
|
|
+%define efi_support 0
|
|
|
|
+
|
|
%ifarch %{ix86}
|
|
%ifarch %{ix86}
|
|
%define _host_cpu i386
|
|
%define _host_cpu i386
|
|
%else
|
|
%else
|
|
@@ -10,7 +12,7 @@ Summary: grub - a Multiboot boot loader.
|
|
Summary(ja): grub - マルチブートローダ
|
|
Summary(ja): grub - マルチブートローダ
|
|
Name: grub
|
|
Name: grub
|
|
Version: 0.97
|
|
Version: 0.97
|
|
-Release: 3%{?_dist_release}
|
|
+Release: 4%{?_dist_release}
|
|
License: GPL
|
|
License: GPL
|
|
Group: System Environment/Base
|
|
Group: System Environment/Base
|
|
URL: http://www.gnu.org/software/grub/
|
|
URL: http://www.gnu.org/software/grub/
|
|
@@ -18,11 +20,14 @@ URL: http://www.gnu.org/software/grub/
|
|
Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz
|
|
Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz
|
|
Source1: %{defshell}
|
|
Source1: %{defshell}
|
|
|
|
|
|
-Patch10: grub-0.97-prototypes.patch
|
|
+# http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary
|
|
-Patch100: ext3_256byte_inode.diff
|
|
+Patch1: grub-fedora-15.patch
|
|
-Patch110: grub-0.97-ext4-support.patch
|
|
+
|
|
-Patch120: grub-0.97-build-id=none.patch
|
|
+#Patch10: grub-0.97-prototypes.patch
|
|
-Patch130: grub-0.97-tinfo.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
|
|
ExclusiveArch: %{ix86} x86_64
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
@@ -61,32 +66,62 @@ GNU GRUB はマルチブートローダです。
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
-%patch10 -p1 -b .prototypes
|
|
+%patch1 -p1 -b .fedora
|
|
-%patch100 -p1 -b .ext3_256byte_inode
|
|
+#%patch10 -p1 -b .prototypes
|
|
-%patch110 -p1 -b .ext4
|
|
+#%patch100 -p1 -b .ext3_256byte_inode
|
|
-%patch120 -p1 -b .build-id
|
|
+#%patch110 -p1 -b .ext4
|
|
-%patch130 -p1 -b .ncurses5
|
|
+#%patch120 -p1 -b .build-id
|
|
-aclocal
|
|
+#%patch130 -p1 -b .ncurses5
|
|
-autoconf
|
|
+
|
|
|
|
+# Modify grub to show the full version number
|
|
|
|
+sed -i 's/0\.97/%{version}-%{release}/' configure.in
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
+autoreconf
|
|
|
|
+autoconf
|
|
GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1)
|
|
GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1)
|
|
-CFLAGS="-Os"
|
|
+CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
|
|
if [ "$GCCVERS" == "4" ]; then
|
|
if [ "$GCCVERS" == "4" ]; then
|
|
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
|
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
|
fi
|
|
fi
|
|
-%ifarch x86_64
|
|
|
|
-CFLAGS="$CFLAGS -static"
|
|
|
|
-%endif
|
|
|
|
export CFLAGS
|
|
export CFLAGS
|
|
-%configure --disable-auto-linux-mem-opt
|
|
+
|
|
|
|
+%if %{efi_support}
|
|
|
|
+%configure --sbindir=/sbin \
|
|
|
|
+ --disable-auto-linux-mem-opt
|
|
|
|
+ --with-platform=efi
|
|
%__make
|
|
%__make
|
|
|
|
+mv efi/grub.efi .
|
|
|
|
+make clean
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+CFLAGS="$CFLAGS -static"
|
|
|
|
+%configure --sbindir=/sbin \
|
|
|
|
+ --disable-auto-linux-mem-opt
|
|
|
|
+%__make
|
|
|
|
+
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
-%makeinstall
|
|
+%makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
|
|
-%{__install} -p -m 644 docs/menu.lst %{buildroot}%{_libdir}/grub/%{_host_cpu}-%{_target_vendor}
|
|
+mkdir -p ${RPM_BUILD_ROOT}/boot/grub
|
|
-%{__install} -p -m 744 %{SOURCE1} %{buildroot}%{_libdir}/grub/%{_host_cpu}-%{_target_vendor}
|
|
+%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
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
@@ -94,7 +129,7 @@ rm -rf $RPM_BUILD_ROOT
|
|
%post
|
|
%post
|
|
/sbin/install-info %{_infodir}/grub.info.gz %{_infodir}/dir
|
|
/sbin/install-info %{_infodir}/grub.info.gz %{_infodir}/dir
|
|
/sbin/install-info %{_infodir}/multiboot.info.gz %{_infodir}/dir
|
|
/sbin/install-info %{_infodir}/multiboot.info.gz %{_infodir}/dir
|
|
-%{_libdir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell}
|
|
+%{_datadir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell}
|
|
|
|
|
|
%preun
|
|
%preun
|
|
if [ $1 = 0 ]; then
|
|
if [ $1 = 0 ]; then
|
|
@@ -105,13 +140,22 @@ fi
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE
|
|
%doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE
|
|
-%{_bindir}/*
|
|
+/boot/grub
|
|
|
|
+%if %{efi_support}
|
|
|
|
+%attr(0755,root,root) /boot/efiu/EFI/vine
|
|
|
|
+%endif
|
|
|
|
+%{_syssbindir}/*
|
|
%{_sbindir}/*
|
|
%{_sbindir}/*
|
|
|
|
+%{_bindir}/*
|
|
|
|
+%{_datadir}/grub
|
|
%{_libdir}/grub
|
|
%{_libdir}/grub
|
|
%{_infodir}/*.info*
|
|
%{_infodir}/*.info*
|
|
%{_mandir}/man*/*
|
|
%{_mandir}/man*/*
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Fri May 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-4
|
|
|
|
+- switch to grub-fedora.git to support new features (ext4/efi/...)
|
|
|
|
+
|
|
* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-3
|
|
* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-3
|
|
- add Patch110 to support ext4 filesystem
|
|
- add Patch110 to support ext4 filesystem
|
|
- add Patch120 to build with current binutils
|
|
- add Patch120 to build with current binutils
|