diff options
-rw-r--r-- | system/grub4dos/README | 12 | ||||
-rw-r--r-- | system/grub4dos/grub4dos.SlackBuild | 95 | ||||
-rw-r--r-- | system/grub4dos/grub4dos.info | 10 | ||||
-rw-r--r-- | system/grub4dos/slack-desc | 19 |
4 files changed, 136 insertions, 0 deletions
diff --git a/system/grub4dos/README b/system/grub4dos/README new file mode 100644 index 0000000000..99d31eecee --- /dev/null +++ b/system/grub4dos/README @@ -0,0 +1,12 @@ +GRUB4DOS is a universal boot loader based on GNU GRUB, with bugfixes +and new features such as built-in BIOS disk emulation, ATAPI CDROM +driver, and Chinese support. It can be loaded from DOS/LINUX, +via Windows boot manager/syslinux/lilo, or from MBR/CD. + +To build the Chinese version, run the script like this: +CHINESE="yes" ./grub4dos.SlackBuild + +This package does not conflict with the Grub package in /extra. +It is safe to have both installed. + +Note: this will not build on x86_64. diff --git a/system/grub4dos/grub4dos.SlackBuild b/system/grub4dos/grub4dos.SlackBuild new file mode 100644 index 0000000000..4c9d628f87 --- /dev/null +++ b/system/grub4dos/grub4dos.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware build script for grub4dos + +# Written by Steven Pledger <slacker4life@rocketmail.com> + +PRGNAM=grub4dos +VERSION=${VERSION:-0.4.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +# Build Chinese version +CHINESE="${CHINESE:-no}" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +unzip $CWD/$PRGNAM-$VERSION-src.zip +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Included patch that translates to Chinese +[ "$CHINESE" = "yes" ] && patch -p1 < patch-chinese.diff + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +sh configure \ + --enable-preset-menu=preset_menu.lst \ + --build=$ARCH-slackware-linux + +make + +# "make install" installs a lot of Grub legacy stuff not used by grub4dos, so install manually + +# hybrid DOS/Linux executable for installing grub4dos +mkdir -p $PKG/usr/sbin +install -m 0755 stage2/bootlace.com $PKG/usr/sbin + +mkdir -p $PKG/usr/share/$PRGNAM +cp -a \ + config.sys default menu.lst grub.pif stage2/grldr stage2/grub.exe \ + stage2/badgrub.exe stage2/grldr.mbr stage2/hmload.com \ + $PKG/usr/share/$PRGNAM + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING README_GRUB4DOS.txt ChangeLog_GRUB4DOS.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/grub4dos/grub4dos.info b/system/grub4dos/grub4dos.info new file mode 100644 index 0000000000..ad6e7edae1 --- /dev/null +++ b/system/grub4dos/grub4dos.info @@ -0,0 +1,10 @@ +PRGNAM="grub4dos" +VERSION="0.4.4" +HOMEPAGE="https://gna.org/projects/grub4dos/" +DOWNLOAD="http://download.gna.org/grub4dos/grub4dos-0.4.4-src.zip" +MD5SUM="984c52f435d4e5f80af5410a900b1e44" +DOWNLOAD_x86_64="UNSUPPORTED" +MD5SUM_x86_64="" +MAINTAINER="Steven Pledger" +EMAIL="slacker4life@rocketmail.com" +APPROVED="rworkman" diff --git a/system/grub4dos/slack-desc b/system/grub4dos/slack-desc new file mode 100644 index 0000000000..05c3637223 --- /dev/null +++ b/system/grub4dos/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +grub4dos: grub4dos (boot loader) +grub4dos: +grub4dos: GRUB4DOS is a universal boot loader based on GNU GRUB, with bugfixes +grub4dos: and new features such as built-in BIOS disk emulation, ATAPI CDROM +grub4dos: driver, and Chinese support. It can be loaded from DOS/LINUX, +grub4dos: via Windows boot manager/syslinux/lilo, or from MBR/CD. +grub4dos: +grub4dos: Homepage: https://gna.org/projects/grub4dos/ +grub4dos: +grub4dos: +grub4dos: |