grub2.spec
Daniel Dawid Majewski
light-i at o2.pl
Sun Dec 14 20:20:00 CET 2008
Od dziś na moim laptopie gości grub2. Jeszcze walczę z konfiguracją, jak
na razie startuję z shella gruba:
linux /boot/vmlinuz root=/dev/sda2
initrd /boot/initrd
boot
Instalowałem przez :
grub2-install /dev/sda
Łatki na speca i brak średnika w jednym z plików w załącznikach.
Changes :
- semicolon added in grub-1.96/normal/parser.y:58 (grub2-parser.patch)
- added bcond_without grubemu (build grub-emu binary)
- added bcond_with grub_d (insert into package /etc/grub.d/* files)
- adapterized
--
Pozdrawiam,
Daniel Dawid Majewski
jabber:light-i/jid.pl
-------------- next part --------------
--- grub-1.96/normal/parser.y~ 2008-02-03 14:11:32.000000000 +0100
+++ grub-1.96/normal/parser.y 2008-12-14 09:57:02.000000000 +0100
@@ -55,7 +55,7 @@
%%
/* It should be possible to do this in a clean way... */
-script_init: { state->err = 0} script
+script_init: { state->err = 0;} script
{
state->parsed = $2;
}
-------------- next part --------------
--- grub2.spec.oryg 2008-12-14 09:15:21.000000000 +0100
+++ grub2.spec 2008-12-14 19:57:59.000000000 +0100
@@ -12,6 +12,8 @@
#
# Conditional build:
%bcond_with static # build static binaries
+%bcond_without grubemu # build grub-emu binary
+%bcond_with grub_d # insert into package /etc/grub.d/* files
#
Summary: GRand Unified Bootloader
Summary(de.UTF-8): GRUB2 - ein Bootloader fĂźr x86 und ppc
@@ -24,6 +26,7 @@
Group: Base
Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
# Source0-md5: 0a40cd2326a4e84d1978060f2e02a956
+Patch0: %{name}-parser.patch
URL: http://www.gnu.org/software/grub/grub-2.en.html
BuildRequires: autoconf >= 2.53
BuildRequires: automake
@@ -34,8 +37,8 @@
BuildRequires: lzo-devel >= 1.0.2
%endif
%ifarch %{x8664}
-BuildRequires: gcc-multilib
BuildRequires: /usr/lib/libc.so
+BuildRequires: gcc-multilib
%endif
BuildRequires: ncurses-devel
#BuildRequires: ruby >= 1.6
@@ -56,6 +59,10 @@
%define _bindir %{_sbindir}
%define _libdir /boot
%define _datadir %{_libdir}/%{name}
+%define _legcdir %{_libdir}/grub
+%if %{with grub_d}
+%define _confdir /etc/grub.d/
+%endif
%description
GRUB is a GPLed bootloader intended to unify bootloading across x86
@@ -103,6 +110,7 @@
%prep
%setup -q -n grub-%{version}
+%patch0 -p1
sed -i -e 's#AC_INIT(GRUB,#AC_INIT(GRUB2,#g' configure.ac
sed -i -e 's,/boot/grub,%{_datadir},' \
./include/grub/util/misc.h ./util/i386/efi/grub-install.in ./util/i386/pc/grub-install.in \
@@ -123,8 +131,8 @@
# mawk stalls at ./genmoddep.awk, so force gawk
AWK=gawk \
%configure \
+%{!?_without_grubemu:--enable-grub-emu}\
BUILD_CFLAGS="$CFLAGS"
-
%{__make} -j1 \
BUILD_CFLAGS="$CFLAGS" \
%if %{with static}
@@ -136,17 +144,17 @@
%endif
grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \
%endif
- pkgdatadir="%{_libdir}/%{name}"
+pkgdatadir="%{_datadir}"
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
- pkgdatadir="%{_libdir}/%{name}"
+pkgdatadir="%{_datadir}"
%ifarch ppc
-install grubof $RPM_BUILD_ROOT%{_libdir}/%{name}
+install grubof $RPM_BUILD_ROOT%{_datadir}
%endif
%ifarch %{ix86} %{x8664}
mv -f $RPM_BUILD_ROOT%{_sbindir}/{grub-install,%{name}-install}
@@ -158,9 +166,24 @@
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README THANKS TODO
-%{_libdir}/%{name}
+%{_datadir}
%attr(755,root,root) %{_sbindir}/grub-mkimage
%attr(755,root,root) %{_sbindir}/grub2-install
+%attr(755,root,root) %{_sbindir}/grub-mkrescue
+%attr(755,root,root) %{_sbindir}/update-grub
+%if %{without grubemu}
+%banner "No %{_sbindir}/grub-emu"
+%else
+%attr(755,root,root) %{_sbindir}/grub-emu
+%endif
+%attr(755,root,root) %{_legcdir}/update-grub_lib
+%if %{with grub_d}
+%attr(755,root,root) %{_confdir}/
+%{_confdir}/00_header
+%{_confdir}/10_hurd
+%{_confdir}/10_linux
+%{_confdir}/README
+%endif
%ifarch %{ix86} %{x8664}
%attr(755,root,root) %{_sbindir}/grub-mkdevicemap
%attr(755,root,root) %{_sbindir}/grub-probe
More information about the pld-devel-pl
mailing list