diff options
Diffstat (limited to 'system/memtest86/memtest86.SlackBuild')
-rw-r--r-- | system/memtest86/memtest86.SlackBuild | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/system/memtest86/memtest86.SlackBuild b/system/memtest86/memtest86.SlackBuild index 62f991c21a..a223030e9b 100644 --- a/system/memtest86/memtest86.SlackBuild +++ b/system/memtest86/memtest86.SlackBuild @@ -22,27 +22,40 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230515 bkw: Modified by SlackBuilds.org, BUILD=4: +# - create a proper top-level source directory (to avoid +# surprising anyone who expects to find one). +# - hardcode ARCH=i586, since we no longer allow i486. this +# is strictly a cosmetic change (it only affects the name +# of the package file, not the contents). + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=memtest86 VERSION=${VERSION:-4.3.7} -BUILD=${BUILD:-2} +BUILD=${BUILD:-4} 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) ;; # OK + x86_64) ;; # OK + *) echo "$ARCH is not supported." >&2; exit 1 ;; +esac + +# 20230515 bkw: Hardcode this. Even if the package contains code that +# would work on i486, this is the minimum *Slackware supported* CPU it +# will run on. +ARCH=i586 -# 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 fi TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM-$VERSION +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} DOCS="README*" @@ -52,11 +65,13 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf src +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz -cd src chown -R root:root . chmod -R u+w,go-w,a+rX-st . +cd src # Permissions and line endings need to be sanitized. # Required so that memtest86+ backported patches will apply cleanly. @@ -94,12 +109,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 |