upgpkg: 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)
This commit is contained in:
Ronald van Haren 2011-08-03 19:21:09 +00:00
parent ba073956e4
commit 4ebc0a4f71
2 changed files with 17 additions and 10 deletions

View File

@ -25,7 +25,7 @@ backup=('boot/grub/menu.lst')
install=grub.install
sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb'
'734fa37ebe1657bf1f8f74ee4866953ff96f2604'
'5479f098c71817ac86d0059cf1c77ca169a6fd93'
'e88a68204c9c9d4bd0b50fa11cab789df4ac55f8'
'157b81dbad3576536b08642242accfa1aeb093a9'
'adbb4685c98797ffb4dc83561ec75698991dddbd'
'f2e0dff29a7c8a45e90aa07298a1b2a9a9d29afc'
@ -36,12 +36,15 @@ sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb'
'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
@ -83,6 +86,10 @@ build() {
--mandir=/usr/share/man --infodir=/usr/share/info
fi
fi
}
package() {
cd $srcdir/$pkgname-$pkgver
CFLAGS= make
make DESTDIR=$pkgdir install

View File

@ -114,15 +114,15 @@ dogrub() {
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 @@ dogrub() {
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 @@ dogrub() {
# 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