summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bevin <gbevin@gentoo.org>2002-02-04 12:52:58 +0000
committerGeert Bevin <gbevin@gentoo.org>2002-02-04 12:52:58 +0000
commit0190a9ea8a467178dbe8845c003086d83cf3f04b (patch)
tree2b928e034bede330a2bf387ff7ccc3c8b97c6809 /sys-apps/grub
parentMoved xmame to app-emulation with other emulators (Bug 421) (diff)
downloadgentoo-2-0190a9ea8a467178dbe8845c003086d83cf3f04b.tar.gz
gentoo-2-0190a9ea8a467178dbe8845c003086d83cf3f04b.tar.bz2
gentoo-2-0190a9ea8a467178dbe8845c003086d83cf3f04b.zip
added pkg-setup() function which checks for /boot being mounted, if this
is not the case the ebuilds try to mount it themselves and in case of failure exit with an error message
Diffstat (limited to 'sys-apps/grub')
-rw-r--r--sys-apps/grub/ChangeLog10
-rw-r--r--sys-apps/grub/files/digest-grub-0.90-r51
-rw-r--r--sys-apps/grub/grub-0.90-r5.ebuild88
-rw-r--r--sys-apps/grub/grub-0.91.ebuild22
4 files changed, 119 insertions, 2 deletions
diff --git a/sys-apps/grub/ChangeLog b/sys-apps/grub/ChangeLog
index 95eeab63698c..bab781ed332e 100644
--- a/sys-apps/grub/ChangeLog
+++ b/sys-apps/grub/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/grub
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/ChangeLog,v 1.1 2002/02/01 21:53:37 gbevin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/ChangeLog,v 1.2 2002/02/04 12:52:58 gbevin Exp $
+
+*grub-0.90-r5 (4 Feb 2002)
+
+ 4 Feb 2002; G.Bevin <gbevin@gentoo.org> grub-0.90-r5.ebuild, grub-0.91.ebuild :
+
+ Added new setup function which detects if /boot is mounted or not, in case
+ it's not mounted it will try to do it automatically and in case of a failure
+ exit with an error message.
*grub-0.90-r4 (1 Feb 2002)
diff --git a/sys-apps/grub/files/digest-grub-0.90-r5 b/sys-apps/grub/files/digest-grub-0.90-r5
new file mode 100644
index 000000000000..ac01f8c63fea
--- /dev/null
+++ b/sys-apps/grub/files/digest-grub-0.90-r5
@@ -0,0 +1 @@
+MD5 e435d871e5d06b3106342d880380605e grub-0.90.tar.gz 741583
diff --git a/sys-apps/grub/grub-0.90-r5.ebuild b/sys-apps/grub/grub-0.90-r5.ebuild
new file mode 100644
index 000000000000..1f235d98ca9c
--- /dev/null
+++ b/sys-apps/grub/grub-0.90-r5.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Mikael Hallendal <hallski@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/grub-0.90-r5.ebuild,v 1.1 2002/02/04 12:52:58 gbevin Exp $
+
+
+S=${WORKDIR}/${P}
+DESCRIPTION="GNU GRUB boot loader"
+SRC_URI="ftp://alpha.gnu.org/gnu/grub/${P}.tar.gz"
+HOMEPAGE="http://www.gnu.org/software/grub"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5.2-r2"
+
+pkg_setup() {
+ if [ `cut -f 2 -d " " /proc/mounts | grep "/boot"` ]
+ then
+ einfo "Your boot partition was detected as being mounted as /boot."
+ einfo "Files will be installed there for grub to function correctly."
+ else
+ mount /boot
+ if [ `cut -f 2 -d " " /proc/mounts | grep "/boot"` ]
+ then
+ einfo "Your boot partition was not mounted as /boot, but portage was able to mount"
+ einfo "it without additional intervention."
+ einfo "Files will be installed there for grub to function correctly."
+ else
+ eerror "Your boot partition has to be mounted on /boot before the installation"
+ eerror "can continue. Grub needs to install important files there."
+ die "Please mount your /boot partition."
+ fi
+ fi
+}
+
+src_unpack() {
+
+ unpack ${A}
+ cd ${S}
+ patch -p1 < ${FILESDIR}/${P}/grub-0.5.97-vga16.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.5.96.1-special-raid-devices.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.5.96.1-dont-give-mem-to-kernel.patch || die
+# patch -p1 < ${FILESDIR}/${P}/grub-0.90-configfile.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.90-vga16-keypressclear.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.90-passwordprompt.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-jfs+xfs-1.0-core.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-jfs+xfs-1.0-build.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.90-install.in.patch || die
+ patch -p1 < ${FILESDIR}/${P}/grub-0.90-installcopyonly.patch || die
+ cp -a ${FILESDIR}/${P}/configure .
+}
+
+src_compile() {
+
+ ./configure --prefix=/usr \
+ --sbindir=/sbin \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --host=${CHOST} || die "Configuration of package failed."
+
+ # Have to do this since the configure-script seems a little brooken
+ echo "#define VGA16 1" >> config.h
+
+ emake -e CPPFLAGS="-Wall -Wmissing-prototypes -Wunused \
+ -Wshadow -malign-jumps=1 -malign-loops=1 \
+ -malign-functions=1 -Wundef" || die "Building failed."
+}
+
+src_install() {
+
+ make prefix=${D}/usr \
+ sbindir=${D}/sbin \
+ mandir=${D}/usr/share/man \
+ infodir=${D}/usr/share/info \
+ install || die "Installation failed."
+
+ if [ -z "`use bootcd`" ]
+ then
+ dodir /boot/grub
+ cd ${D}/usr/share/grub/i386-pc
+ cp stage1 stage2 *stage1_5 ${D}/boot/grub
+ cp ${FILESDIR}/${P}/splash.xpm.gz ${D}/boot/grub
+
+ cd ${S}
+ dodoc AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO
+ else
+ rm -rf ${D}/usr/share/{man,info,doc}
+ fi
+}
diff --git a/sys-apps/grub/grub-0.91.ebuild b/sys-apps/grub/grub-0.91.ebuild
index 63658891307e..d9405b912393 100644
--- a/sys-apps/grub/grub-0.91.ebuild
+++ b/sys-apps/grub/grub-0.91.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: Mikael Hallendal <hallski@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/grub-0.91.ebuild,v 1.1 2002/01/29 15:58:41 gbevin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/grub/grub-0.91.ebuild,v 1.2 2002/02/04 12:52:58 gbevin Exp $
S=${WORKDIR}/${P}
@@ -13,6 +13,26 @@ DEPEND="virtual/glibc
>=sys-devel/binutils-2.9.1.0.23
>=sys-libs/ncurses-5.2-r2"
+pkg_setup() {
+ if [ `cut -f 2 -d " " /proc/mounts | grep "/boot"` ]
+ then
+ einfo "Your boot partition was detected as being mounted as /boot."
+ einfo "Files will be installed there for grub to function correctly."
+ else
+ mount /boot
+ if [ `cut -f 2 -d " " /proc/mounts | grep "/boot"` ]
+ then
+ einfo "Your boot partition was not mounted as /boot, but portage was able to mount"
+ einfo "it without additional intervention."
+ einfo "Files will be installed there for grub to function correctly."
+ else
+ eerror "Your boot partition has to be mounted on /boot before the installation"
+ eerror "can continue. Grub needs to install important files there."
+ die "Please mount your /boot partition."
+ fi
+ fi
+}
+
src_unpack() {
unpack ${A}