summaryrefslogtreecommitdiff
path: root/libre/grub-legacy
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
committerroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
commit6eea0bd1e92ed5aa53cb5f59102529c88e9e1786 (patch)
treeb069468f4084f5af5ad3ba2ecab7e6b4deb90267 /libre/grub-legacy
parent3f7cb62ef558ea147661abe007a4293c0069fc62 (diff)
Sat Nov 10 01:23:30 PST 2012
Diffstat (limited to 'libre/grub-legacy')
-rw-r--r--libre/grub-legacy/PKGBUILD78
-rw-r--r--libre/grub-legacy/automake-pkglib.patch48
2 files changed, 83 insertions, 43 deletions
diff --git a/libre/grub-legacy/PKGBUILD b/libre/grub-legacy/PKGBUILD
index d63a33ec9..20e9fdb43 100644
--- a/libre/grub-legacy/PKGBUILD
+++ b/libre/grub-legacy/PKGBUILD
@@ -1,19 +1,24 @@
-# $Id: PKGBUILD 141999 2011-11-03 21:16:38Z ronald $
+# $Id: PKGBUILD 142375 2011-11-08 22:04:23Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Maintainer: ava1ar <mail(dot)avatar(at)gmail(dot)com>
# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
-# Maintainer (Parabola): Jorge López <jorginho@adinet.com.uy>
+# Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
-pkgname=grub
+pkgname=grub-legacy
+_srcname=grub
pkgver=0.97
-pkgrel=21.4
+pkgrel=23
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')
+conflicts=('grub' 'grub-common' 'grub-bios' 'grub-efi-i386' 'grub-efi-x86_64')
+replaces=('grub')
+provides=("grub=${pkgver}")
+[ "$CARCH" = 'x86_64' ] && makedepends=('gcc-multilib')
optdepends=('xfsprogs: freezing of xfs /boot in install-grub script')
-source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz
+source=(ftp://alpha.gnu.org/gnu/grub/${_srcname}-${pkgver}.tar.gz
menu.lst
install-grub
040_all_grub-0.96-nxstack.patch
@@ -23,12 +28,13 @@ source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz
more-raid.patch
intelmac.patch
grub-inode-size.patch
- ext4.patch
- grub-0.97-ldflags-objcopy-remove-build-id.patch)
+ ext4.patch
+ grub-0.97-ldflags-objcopy-remove-build-id.patch
+ automake-pkglib.patch)
backup=('boot/grub/menu.lst')
install=grub.install
sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb'
- 'e13bf0f91510fd6bb9451e6eb1b2a6e4a03e8b5f'
+ 'de504b22f586a8919c12ea3446cae3300a8365f0'
'3e23bfee50285c8c7b9ef9ec07964310278b1e09'
'157b81dbad3576536b08642242accfa1aeb093a9'
'adbb4685c98797ffb4dc83561ec75698991dddbd'
@@ -38,16 +44,11 @@ sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb'
'066d7ab1ae442f88e94c9e4f1867ac6682965d06'
'0436aa6fa0b6f768289172f983a3f4b69384629e'
'a36f34e51efed540f1ddafd78e9c9f6d83e4c8d4'
- '61c4b58d2eaa3c1561d8e9d8fc41341ce8882869')
-
-#set destination architecture here
-#DESTARCH="i686"
-DESTARCH="x86_64"
-
+ '61c4b58d2eaa3c1561d8e9d8fc41341ce8882869'
+ '776ed278eb8ff80e949834f763fad68b8741e7cd')
build() {
- cd $srcdir/$pkgname-$pkgver
- fgrep -rlZ pkglib_DATA --include Makefile.am . | xargs -0 sed -i 's/pkglib_DATA/pkgdata_DATA/g'
+ cd ${srcdir}/${_srcname}-${pkgver}
# optimizations break the build -- disable them
# adding special devices to grub, patches are from fedora
@@ -62,9 +63,11 @@ build() {
patch -Np1 -i ../ext4.patch
# binutils fix
patch -Np1 -i ../grub-0.97-ldflags-objcopy-remove-build-id.patch
+ # "pkglib" is a reserved keyword in automake fix
+ patch -Np1 -i ../automake-pkglib.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"
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_CC_C_O\ ' -i "${srcdir}/${_srcname}-${pkgver}/configure.ac"
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_AS\ ' -i "${srcdir}/${_srcname}-${pkgver}/configure.ac"
## recreate ./configure script with the required changes in LDFLAGS and objcopy
aclocal
@@ -72,36 +75,25 @@ build() {
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
+ if [ "$CARCH" = "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
- 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
+ CFLAGS="-fno-strict-aliasing" ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin \
+ --mandir=/usr/share/man --infodir=/usr/share/info
fi
}
package() {
- cd $srcdir/$pkgname-$pkgver
+ cd ${srcdir}/${_srcname}-${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
+ 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
}
diff --git a/libre/grub-legacy/automake-pkglib.patch b/libre/grub-legacy/automake-pkglib.patch
new file mode 100644
index 000000000..a3fff27a1
--- /dev/null
+++ b/libre/grub-legacy/automake-pkglib.patch
@@ -0,0 +1,48 @@
+--- a/stage1/Makefile.am
++++ b/stage1/Makefile.am
+@@ -1,7 +1,7 @@
+-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
+-nodist_pkglib_DATA = stage1
++stagedir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
++nodist_stage_DATA = stage1
+
+-CLEANFILES = $(nodist_pkglib_DATA)
++CLEANFILES = $(nodist_stage_DATA)
+
+ # We can't use builtins or standard includes.
+ AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
+--- a/stage2/Makefile.am
++++ b/stage2/Makefile.am
+@@ -27,12 +27,12 @@
+ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
+
+ # Stage 2 and Stage 1.5's.
+-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
++stagedir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
+
+ EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec
+
+ if DISKLESS_SUPPORT
+-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
++stage_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
+ ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
+ reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \
+ nbgrub pxegrub
+@@ -43,7 +43,7 @@
+ reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \
+ xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec
+ else
+-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
++stage_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
+ ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
+ reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5
+ noinst_DATA = pre_stage2 start start_eltorito
+@@ -112,7 +112,7 @@
+ BUILT_SOURCES = stage2_size.h
+ endif
+
+-CLEANFILES = $(pkglib_DATA) $(noinst_DATA) $(BUILT_SOURCES)
++CLEANFILES = $(stage_DATA) $(noinst_DATA) $(BUILT_SOURCES)
+
+ stage2_size.h: pre_stage2
+ -rm -f stage2_size.h