aboutsummaryrefslogtreecommitdiff
path: root/system/memtest86/memtest86.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2022-12-11 16:46:29 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-12-17 09:14:03 +0700
commit2ceb83a4a5e7cbb2fb7f42d3a1d40fa2470583c2 (patch)
tree7362bcf999d9c1844e807561e0a70624c64932a9 /system/memtest86/memtest86.SlackBuild
parentedcf9c5771fcc9666e00ef6257c50b51c1d1454a (diff)
system/memtest86: Add GRUB autodetection script
Signed-off-by: Kyle Guinn <elyk03@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/memtest86/memtest86.SlackBuild')
-rw-r--r--system/memtest86/memtest86.SlackBuild15
1 files changed, 10 insertions, 5 deletions
diff --git a/system/memtest86/memtest86.SlackBuild b/system/memtest86/memtest86.SlackBuild
index 62f991c21abac..1e8e9e469562c 100644
--- a/system/memtest86/memtest86.SlackBuild
+++ b/system/memtest86/memtest86.SlackBuild
@@ -26,16 +26,18 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=memtest86
VERSION=${VERSION:-4.3.7}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
# i486 only. Modify the Makefile at your own risk :-)
-ARCH=i486
+ARCH=${ARCH:-$(uname -m)}
+case $ARCH in
+ i?86) ARCH=i486 ;;
+ x86_64) ARCH=i486 ;;
+ *) echo "$ARCH is not supported." >&2; exit 1 ;;
+esac
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -94,12 +96,15 @@ install -D -m 0644 memtest.bin $PKG/boot/$PRGNAM-$VERSION.bin
ln -s $PRGNAM-$VERSION $PKG/boot/$PRGNAM
ln -s $PRGNAM-$VERSION.bin $PKG/boot/$PRGNAM.bin
+install -D -m 0755 $CWD/20_memtest86 $PKG/etc/grub.d/20_memtest86.new
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE