Date: Wednesday, August 3, 2011 @ 15:21:09
  Author: ronald
Revision: 134414

upgpkg: grub 0.97-18
fix compile issues; handle new kernel naming scheme in install-grub script; 
make install-grub script slightly smarter (though still not very smart)

Modified:
  grub/trunk/PKGBUILD
  grub/trunk/install-grub

--------------+
 PKGBUILD     |   15 +++++++++++----
 install-grub |   12 ++++++------
 2 files changed, 17 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2011-08-03 18:33:46 UTC (rev 134413)
+++ PKGBUILD    2011-08-03 19:21:09 UTC (rev 134414)
@@ -26,7 +26,7 @@
 install=grub.install
 sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb'
           '734fa37ebe1657bf1f8f74ee4866953ff96f2604'
-          '5479f098c71817ac86d0059cf1c77ca169a6fd93'
+          'e88a68204c9c9d4bd0b50fa11cab789df4ac55f8'
           '157b81dbad3576536b08642242accfa1aeb093a9'
           'adbb4685c98797ffb4dc83561ec75698991dddbd'
           'f2e0dff29a7c8a45e90aa07298a1b2a9a9d29afc'
@@ -37,12 +37,15 @@
           'a36f34e51efed540f1ddafd78e9c9f6d83e4c8d4'
           '61c4b58d2eaa3c1561d8e9d8fc41341ce8882869')
 
+
+#set destination architecture here
+#DESTARCH="i686"
+DESTARCH="x86_64"
+
+
 build() {
   cd $srcdir/$pkgname-$pkgver
 
-  #set destination architecture here
-  #DESTARCH="i686"
-  DESTARCH="x86_64"
   # optimizations break the build -- disable them
   # adding special devices to grub, patches are from fedora
   patch -Np1 -i ../special-devices.patch
@@ -84,7 +87,11 @@
                   --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

Modified: install-grub
===================================================================
--- install-grub        2011-08-03 18:33:46 UTC (rev 134413)
+++ install-grub        2011-08-03 19:21:09 UTC (rev 134414)
@@ -114,15 +114,15 @@
       head -n $(cat /tmp/.menu.lst | grep -n '#-\*' | cut -d: -f 1) 
/tmp/.menu.lst >/boot/grub/menu.lst
       rm -f /tmp/.menu.lst
 
-      for kernel in /boot/vmlinuz-linux* /boot/vmlinuz26*; do
-       if [ ${kernel} == "/boot/vmlinuz-linux*" ] || [ ${kernel} == 
"/boot/vmlinuz26*" ] ; then
+      for kernel in /boot/vmlinuz-linux* /boot/vmlinuz26-*; do
+       if [ ${kernel} == "/boot/vmlinuz-linux*" ] || [ ${kernel} == 
"/boot/vmlinuz26-*" ] ; then
          echo > /dev/null
        else
          VMLINUZ=$( echo ${kernel} | cut -c 7- )
 
-         if [ "$( echo ${VMLINUZ} | cut -c -13 )" = vmlinuz-linux ]; then # 
new naming scheme for linux > 3.0
+         if [ "$( echo ${VMLINUZ} | cut -c -13 )" = "vmlinuz-linux" ]; then # 
new naming scheme for linux > 3.0
            extension=$( echo ${VMLINUZ} | cut -c 14- )
-           INITRAMFS_BASENAME = initramfs-linux${extension}
+           INITRAMFS_BASENAME=initramfs-linux${extension}
          else # old naming scheme for lts kernel
            extension=$( echo ${VMLINUZ} | cut -c 10- ) 
            INITRAMFS_BASENAME=kernel26${extension}
@@ -130,7 +130,7 @@
 
          echo "" >>/boot/grub/menu.lst
          echo "# (0) Arch Linux" >>/boot/grub/menu.lst
-         echo "title  Arch Linux" >>/boot/grub/menu.lst
+         echo "title  Arch Linux - ${VMLINUZ}" >>/boot/grub/menu.lst
          subdir=
          if [ "${bootdev}" != "" ]; then
            grubdev=$(mapdev ${bootdev})
@@ -144,7 +144,7 @@
                
          # adding fallback/full image
          echo "# (1) Arch Linux" >>/boot/grub/menu.lst
-         echo "title  Arch Linux Fallback" >>/boot/grub/menu.lst
+         echo "title  Arch Linux Fallback - ${VMLINUZ}" >>/boot/grub/menu.lst
          echo "root   ${grubdev}" >>/boot/grub/menu.lst
          echo "kernel ${subdir}/${VMLINUZ} root=${PART_ROOT} ro" 
>>/boot/grub/menu.lst
          echo "initrd ${subdir}/${INITRAMFS_BASENAME}-fallback.img" 
>>/boot/grub/menu.lst

Reply via email to