Пакет grub: Specfile

Name: grub
Version: 0.97
Release: alt5

Summary: GRand Unified Bootloader
Group: System/Kernel and hardware
License: GPL
URL: http://www.gnu.org/software/grub/grub.en.html

ExclusiveArch: %ix86

Packager: Sir Raorn <raorn@altlinux.ru>

Source: ftp://alpha.gnu.org/gnu/grub/%name-%version.tar
Patch: %name-%version-%release.patch

Provides: %name-doc = %version, %name-graph = %version
Obsoletes: %name-doc, %name-graph

# Automatically added by buildreq on Mon Feb 25 2008
BuildRequires: libncurses-devel tetex-latex

##BuildRequires: libncurses-devel reiser4progs-minimal-devel tetex-latex

%package utils
Group: System/Kernel and hardware
Summary: Additional utilites for %name

%description
GNU GRUB is a multiboot boot loader. It was derived from GRUB. It is an
attempt to produce a boot loader for IBM PC-compatible machines that
has both the ability to be friendly to beginning or otherwise
nontechnically interested users and the flexibility to help experts in
diverse environments. It is compatible with Free/Net/OpenBSD and Linux.
It supports Win 9x/NT and OS/2 via chainloaders. It has a menu
interface and a command line interface.
It implements the Multiboot standard, which allows for flexible loading
of multiple boot images (needed for modular kernels such as the GNU
Hurd).

%description utils
Additional utilites for %name

%prep
%setup
%patch -p1

%build
%autoreconf

%define _optlevel s
%add_optflags -W -Wall -Wpointer-arith
%add_optflags -fno-stack-protector -fno-strict-aliasing -minline-all-stringops
%ifarch x86_64
 %add_optflags -m32 -fno-asynchronous-unwind-tables
%endif  
%configure \
  --bindir=/bin --sbindir=/sbin \
  --disable-auto-linux-mem-opt --enable-diskless \
  --enable-{3c50{3,7},3c5{0,2}9,3c595,3c90x,cs89x0,davicom,depca,eepro{,100},epic100} \
  --enable-{exos205,lance,ne,ne2100,ni{50,52,65}00,ns8390} \
  --enable-{rtl8139,sk-g16,smc9000,tiara,tulip,via-rhine,w89c840,wd} 
%make_build
(cd stage2; mv nbgrub pxegrub ..)
mv stage2/stage2{,.netboot}
%make_build clean
%configure \
  --bindir=/bin --sbindir=/sbin \
  --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} --datadir=%{_datadir} \
  --libexecdir=%{_libexecdir} \
  --disable-auto-linux-mem-opt 
%make_build
%make_build -C docs dvi

%install
%make_install DESTDIR=%buildroot install
mkdir -p %buildroot/boot/grub/pictures
ln -sfn . %buildroot/boot/boot
install -p {nb,pxe}grub stage2/stage2{,.netboot} %buildroot/boot/grub
install -m755 -p grubonce %buildroot/sbin
mv %buildroot%_libexecdir/grub/* %buildroot/boot/grub
rm -rf %buildroot%_libexecdir/grub
ln -sfn ../../boot/grub %buildroot%_libexecdir 

%post
if [ -x /usr/sbin/detectloader -a -f /proc/partitions ]; then
  LOADER=$(/usr/sbin/detectloader)
  if [ "$LOADER" = "GRUB" ]; then
    if [ -s /etc/sysconfig/grub ]; then
      # This file should be created by (future) alterator-grub
      /sbin/grub --batch < /etc/sysconfig/grub > /dev/null
    elif [ -s /boot/grub/install.sh ]; then
      # Old grub installation
      sh /boot/grub/install.sh > /dev/null
    else
      cat <<EOF >&2
Please install GRUB manually.
EOF
    fi
  fi
fi

[ -s /boot/grub/default ] || /sbin/grub-set-default default

%install_info %name.info
%install_info multiboot.info

%preun
%uninstall_info %name.info
%uninstall_info multiboot.info

%files
%doc BUGS NEWS TODO README THANKS AUTHORS INSTALL ChangeLog COPYING docs/menu.lst
%dir /boot/grub
%dir /boot/boot
/boot/grub/*stage*
/boot/grub/nbgrub
/boot/grub/pxegrub
%_infodir/*
%_mandir/*/*
/sbin/*
/bin/*
%exclude /sbin/grub-terminfo
%dir %_libexecdir/grub

%files utils
/sbin/grub-terminfo

%changelog
* Tue Aug 19 2008 Sir Raorn <raorn@altlinux.ru> 0.97-alt5
- Updated to CVS 20080520 (license update in sources)
- Dynamic inode size support from SuSE and Debian
- Execute "grub-set-default default" if /boot/grub/default
  missing (closes: #9689)
- Check /etc/sysconfig/grub before old-style /boot/grub/install.sh
- Fixed XEN menu entry example

* Fri Apr 18 2008 Sir Raorn <raorn@altlinux.ru> 0.97-alt4
- Updated to CVS 20080410
- Fixed wrong condition in %%post (closes: #14795)
- Seek to 0 when reading MBR
- Turn on --no-floppy mode by default
- Emit warning if device map is empty
- More ALT-specific menu.lst example

* Thu Feb 28 2008 Sir Raorn <raorn@altlinux.ru> 0.97-alt3
- Resurrected from orphaned
- Removed ReiserFS4 support
- Updated gfxboot support from SuSE
- mdraid/dmraid support in grub-install(8) from Fedora
- All binaries moved to /bin and /sbin
- Wildcard menu.lst entries support from SuSE

* Tue May 30 2006 Andriy Stepanov <stanv@altlinux.ru> 0.97-alt2
- Add support for reiser4 FS

* Wed May 24 2006 Andriy Stepanov <stanv@altlinux.ru> 0.97-alt1
- Switch to new version. Dual plain grub and with PXE support.

* Wed Oct 20 2004 Stanislav Ievlev <inger@altlinux.org> 0.95-alt1
- 0.95

* Tue Mar 09 2004 Stanislav Ievlev <inger@altlinux.org> 0.94-alt1
- 0.94

* Wed Jan 14 2004 Stanislav Ievlev <inger@altlinux.org> 0.93-alt2
- fix building with gcc3.3

* Tue Apr 08 2003 Stanislav Ievlev <inger@altlinux.ru> 0.93-alt1
- removed patches for old graphics support
- removed grub-splashes too
- patch (nodeprecatedflags) removed
- dump patch turned off
- new grub-terminfo utility placed into grub-utils subpackage (to avoid deps on termutils-devel)

* Fri Feb 07 2003 Stanislav Ievlev <inger@altlinux.ru> 0.92-alt3.1
- removed old graphics support
- removed grub-graph package (now obsolete)

* Mon Feb 03 2003 Rider <rider@altlinux.ru> 0.92-alt3
- GFX menu support from SuSE

* Sun Oct  6 2002 Ivan Zakharyaschev <imz@altlinux.ru> 0.92-alt2
- try to fix graph menu cursor clearing passed items: keypressclear patch 
  modified -- now it refreshes the screen multiple times 
  (not only the first time)

* Mon Apr 01 2002 Stanislav Ievlev <inger@altlinux.ru> 0.91-alt5
- Added patch to fix meminfo displaying

* Fri Feb 15 2002 Stanislav Ievlev <inger@altlinux.ru> 0.91-alt4
- fixed grub-install

* Mon Feb 04 2002 Stanislav Ievlev <inger@altlinux.ru> 0.91-alt3
- real dump terminal fix and some other patches from grub-bug mailing list
 

* Wed Jan 30 2002 Stanislav Ievlev <inger@altlinux.ru> 0.91-alt2
- added temporary hack for the DUMB_TERMINAL mode

* Tue Jan 29 2002 Stanislav Ievlev <inger@altlinux.ru> 0.91-alt1
- 0.91
- all mandrake patches removed

* Fri Nov 16 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt8
- Added latest XFS+JFS patches 
- Added some RH patches

* Wed Nov 14 2001 Dmitry V. Levin <ldv@alt-linux.org> 0.90-alt7
- Moved rebootin utility to bootloader-utils package.

* Wed Aug 22 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt6
- New image and new package (graph).

* Wed Aug 15 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt5
- Added first picture ( Junior ;) ).

* Mon Aug 13 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt4
- Added patch for JFS support

* Wed Aug 08 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt3
- Removed Mandrake's builtins. We don't need it
- Added vga16 support.
- We don't  need previous hack now. All works.
  Problem was: some bad function set errnum nonzero.

* Thu Aug 02 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt2
- Temporary hack: memcheck() function doesn't work.

* Thu Jul 26 2001 Stanislav Ievlev <inger@altlinux.ru> 0.90-alt1
- 0.90. Little changes from previous snapshot

* Thu Jun 28 2001 Stanislav Ievlev <inger@altlinux.ru> 0.5.96.1-ipl5mdk
- Update to CVS at 20010530

* Mon May 28 2001 Stanislav Ievlev <inger@altlinux.ru> 0.5.96.1-ipl4mdk
- New patches from Mandrake

* Mon Dec 18 2000 AEN <aen@logic.ru>
- adopted for RE

* Mon Dec 11 2000 Pixel <pixel@mandrakesoft.com> 0.5.96.1-2mdk
- add a call to /boot/grub/install.sh if needed

* Sat Dec  9 2000 Pixel <pixel@mandrakesoft.com> 0.5.96.1-1mdk
- new version
  * patch fixbiosbug-nbsectors no more needed (unless you define NO_BUGGY_BIOS_IN_THE_WORLD)

* Thu Aug 24 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-7mdk
- %%uninstall_info is fixed, yeepee :)

* Tue Aug 22 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-6mdk
- fixbiosbug-nbsectors for some Geom Errors (warly's case)

* Wed Aug 16 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-5mdk
- fix erroneous remove_info macro (sillyme)

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.5.95-4mdk
- automatically added BuildRequires

* Fri Jul 21 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-3mdk
- macroization, BM

* Wed Jul 12 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-2mdk
- add a patch for ezbios nonsense

* Mon Jul  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-1mdk
- new version

* Sat May 20 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-14mdk
- add rebootin command (use altconfigfile cmd in menu.lst)
- add altconfigfile (read once)

* Mon May  8 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-12mdk
- add reiserfs handling (missing symlink handling though)

* Wed May  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-11mdk
- fix for linux-extended extended partition

* Tue May  2 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-10mdk
- fix case of not found keytable

* Tue Apr 18 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-9mdk
- remove a patch from caldera

* Sun Apr 16 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-8mdk
- nicer menu
- don't add automatic mem= if one is given

* Tue Apr  4 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-7mdk
- fix install path

* Mon Apr  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-6mdk
- integrate patches from caldera

* Fri Mar 31 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-5mdk
- re-rebuild

* Wed Mar 29 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-4mdk
- big patch (i18n & look)

* Sat Mar 25 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-3mdk
- split printable doc and some more to have smaller package (keep mainly info in
main package, very good one)
- cleanup install-info in %% post scripts

* Fri Mar 24 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-2mdk
- remove unneeded patch
- use of %% { ix86 }

* Wed Mar 22 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-1mdk
- remove now unneeded --disable-gunzip
- added option --disable-lba-support-bitmap-check
- patch for *very* buggy bioses (tells grub every hd is gigantic)
- new version

* Mon Mar 13 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-7mdk
- configure with --disable-gunzip
(so that initrd is not gunzip'ed and fits in memory, that's the kernel's job anyway)

* Wed Mar  1 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-6mdk
- remove no-device-check (was stupid)
- replace by something better (option --devices)

* Tue Feb 29 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-5mdk
- add option no-device-check for grub binary (mainly for non-interactive use)

* Sun Jan 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-4mdk
- Add Exclusivearch.

* Tue Jan 4 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-3mdk
- Add install_grub_on_floppy script (thnks b.bodin).
- Add dvi docs (tknks b.bodin).

* Mon Jan  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-2mdk
- Add %%packager (thnks rpmlint).
- Remove CFLAGS.

* Mon Jan  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- First spec file for Mandrake distribution based on debian version.