summaryrefslogtreecommitdiff
path: root/libre/grub/PKGBUILD
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-08-20 15:19:05 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-08-20 15:19:05 -0300
commitbe581da336f0c3fb6e2b4ddbeafbfe6d5b35c585 (patch)
treea4dff19a8d4cdfec44fb38f55a92aa5ccaaa2048 /libre/grub/PKGBUILD
parentf57da435c77f3eb8423e9921bfc4b139f7637d18 (diff)
downloadabslibre-be581da336f0c3fb6e2b4ddbeafbfe6d5b35c585.tar.gz
abslibre-be581da336f0c3fb6e2b4ddbeafbfe6d5b35c585.tar.bz2
abslibre-be581da336f0c3fb6e2b4ddbeafbfe6d5b35c585.zip
libre/grub-0.97-20
Parabola rebranded
Diffstat (limited to 'libre/grub/PKGBUILD')
-rw-r--r--libre/grub/PKGBUILD92
1 files changed, 92 insertions, 0 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
new file mode 100644
index 000000000..bca7a98e3
--- /dev/null
+++ b/libre/grub/PKGBUILD
@@ -0,0 +1,92 @@
+# $Id: PKGBUILD 134896 2011-08-08 17:30:51Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+
+pkgname=grub
+pkgver=0.97
+pkgrel=20
+pkgdesc="A GNU multiboot boot loader (Parabola rebranded)"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnu.org/software/grub/"
+groups=('base')
+depends=('ncurses' 'diffutils' 'sed')
+optdepends=('xfsprogs: freezing of xfs /boot in install-grub script')
+source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz
+ menu.lst
+ install-grub
+ 040_all_grub-0.96-nxstack.patch
+ 05-grub-0.97-initrdaddr.diff
+ i2o.patch
+ special-devices.patch
+ more-raid.patch
+ intelmac.patch
+ grub-inode-size.patch
+ ext4.patch
+ grub-0.97-ldflags-objcopy-remove-build-id.patch)
+backup=('boot/grub/menu.lst')
+install=grub.install
+
+#set destination architecture here
+DESTARCH="i686"
+#DESTARCH="x86_64"
+
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # optimizations break the build -- disable them
+ # adding special devices to grub, patches are from fedora
+ patch -Np1 -i ../special-devices.patch
+ patch -Np1 -i ../i2o.patch
+ patch -Np1 -i ../more-raid.patch
+ patch -Np1 -i ../intelmac.patch
+ # Add support for bigger inode size to e2fs_stage1_5
+ patch -Np1 -i ../grub-inode-size.patch
+ # Add ext4 support
+ # http://www.mail-archive.com/bug-grub@gnu.org/msg11458.html
+ patch -Np1 -i ../ext4.patch
+ # binutils fix
+ patch -Np1 -i ../grub-0.97-ldflags-objcopy-remove-build-id.patch
+
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_CC_C_O\ ' -i "${srcdir}/${pkgname}-${pkgver}/configure.ac"
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_AS\ ' -i "${srcdir}/${pkgname}-${pkgver}/configure.ac"
+
+ ## recreate ./configure script with the required changes in LDFLAGS and objcopy
+ aclocal
+ autoconf
+ autoreconf
+ automake
+
+ #arch64 fixes for static build
+ if [ "$CARCH" = "x86_64" ]; then ## correcting problems for new wersion of autotools
+
+ echo "this package has to be built on i686, won't compile on x86_64"
+ sleep 5
+ else
+ if [ "$DESTARCH" = "x86_64" ]; then
+ # patch from gentoo for fixing a segfault
+ patch -Np1 -i ../040_all_grub-0.96-nxstack.patch
+ # patch from frugalware to make it boot when more than 2GB ram installed
+ patch -Np1 -i ../05-grub-0.97-initrdaddr.diff
+ CFLAGS="-static -fno-strict-aliasing" ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin \
+ --mandir=/usr/share/man --infodir=/usr/share/info
+ else
+ CFLAGS="-fno-strict-aliasing" ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin \
+ --mandir=/usr/share/man --infodir=/usr/share/info
+ fi
+ fi
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ CFLAGS= make
+ make DESTDIR=$pkgdir install
+ install -D -m644 ../menu.lst $pkgdir/boot/grub/menu.lst
+ install -D -m755 ../install-grub $pkgdir/sbin/install-grub
+
+ if [ "$DESTARCH" = "x86_64" ]; then
+ # fool makepkg into building a x86_64 package
+ export CARCH="x86_64"
+ fi
+}