# $Id$ PNAME="grub" PVER="1.99" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="GNU GRUB2 boot loader." HOMEPAGE="http://www.gnu.org/software/grub/" DEPEND=">= sys-libs/ncurses-5.9 >= sys-libs/zlib-1.2.5 >= media-libs/freetype-2.4 >= app-arch/xz-utils-5" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( gnu://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd_gnu ${PNAME} gz" # grub doesn't like CFLAG optimation, # and do you really want that at your bootloader ?? unset CFLAGS unset CXXFLAGS src_compile() { cd ${SRCDIR} mconfigure \ --sbindir=/sbin \ --bindir=/bin \ --libdir=/$(mlibdir) \ --disable-efiemu \ --disable-werror \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # fix a missing symlink mlink /bin/grub-mkimage /sbin || die minstalldir ${BINDIR}/boot/grub || die cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF" default 0 timeout 30 title Magellan-Linux linux (hd0,0)/boot/vmlinuz root=/dev/hda3 initrd (hd0,0)/boot/initrd EOF # docs minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die } preinstall() { mount /boot &> /dev/null } postinstall() { [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub # creates some essential links [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot # # update grub # grub --batch --device-map=/boot/grub/device.map &/dev/null; echo echo "Begining with GRUB2 the location of the config file has changed." echo "You will find it at /boot/grub/grub.cfg" echo "Also be aware of the changed commands." echo "'kernel' isn't used anymore but 'linux'." echo }