#Packager: Shador pkgname=grub2 pkgver=1.98 pkgrel=2ab #arch=x86_64 source=("http://alpha.gnu.org/gnu/grub/grub-1.98.tar.gz" "http://unifoundry.com/unifont-5.1.20080820.bdf.gz" "http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/05_salix_theme" "http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/salix.jpg" "grub-localedir-lowercase.patch" "grub-install-locale-fix.patch") sourcetemplate="http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/" docs=("readme" "install" "copying" "changelog" "authors" "news" "thanks" "todo") url='http://www.gnu.org/software/grub/grub-2.en.html' options=('noautodotnew') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname (the second GNU GRand Unified Bootloader)" "GRUB 2 has been rewritten from scratch to clean up everything for" "modularity and portability." "Features are: Scripting support, Graphical interface, Rescue mode," "cross-platform and many more" "Briefly, boot loader is the first software program that runs when a" "computer starts. It is responsible for loading and transferring" "control to the operating system kernel software (such as the Hurd or" "the Linux). The kernel, in turn, initializes the rest of the operating" "system (e.g. GNU)." ) build() { threadcount=$(($(sed -ne '/cpu cores/h;${g;s/[^0-9]*//p}' \ < /proc/cpuinfo)*2)) if [ $threadcount -lt 2 ]; then threadcount=2 elif [ $threadcount -gt 8 ]; then threadcount=8 fi threads="-j${threadcount}" cd $startdir/src/grub-$pkgver patch -p0 -i $startdir/src/grub-localedir-lowercase.patch || return 1 patch -p0 -i $startdir/src/grub-install-locale-fix.patch || return 1 FONT_SOURCE="$startdir/src/unifont-5.1.20080820.bdf" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ --mandir=/usr/man \ --enable-grub-mkfont \ --disable-grub-emu-usb \ --disable-grub-emu-sdl \ --disable-grub-emu-pci \ --disable-grub-fstest || return 1 make $threads || return 1 make install DESTDIR=$startdir/pkg || return 1 cd $startdir/src install -m644 -vD salix.jpg $startdir/pkg/boot/grub/salix.jpg sed -e "s;/lib;/lib${LIBDIRSUFFIX};" -i 05_salix_theme install -m755 -vD 05_salix_theme $startdir/pkg/etc/grub.d/05_salix_theme }