# $Id$ PNAME="grub" PVER="1.98" PBUILD="r1" PCATEGORIE="sys-apps" STATE="disabled" DESCRIPTION="GNU GRUB2 boot loader." HOMEPAGE="http://www.gnu.org/software/grub/" DEPEND=">= sys-libs/ncurses-5.7 >= dev-libs/lzo-2" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" SRC_URI=( ftp://alpha.gnu.org/gnu/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) # get only 1.xx versions! UP2DATE="updatecmd ftp://alpha.gnu.org/gnu/${PNAME} | grep -- -1.[0-9].* | lasttarball gz" # grub doesn't like CFLAG optimation, # and do you really want that at your bootloader ?? unset CFLAGS unset CXXFLAGS src_compile() { cd ${SRCDIR} # enable static builds for x84_64 if [[ ${ARCH} = x86_64 ]] then export CC="gcc -m32" export LDFLAGS="-static" fi mconfigure --prefix=/ --datadir=/usr/lib || 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 }