system/memtest86: Align with template.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-05-15 18:38:07 -04:00 committed by Willy Sudiarto Raharjo
parent 78af41b9bf
commit 2c67682426
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 20 additions and 7 deletions

View File

@ -22,29 +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:-3}
BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
# i486 only. Modify the Makefile at your own risk :-)
ARCH=${ARCH:-$(uname -m)}
case $ARCH in
i?86) ARCH=i486 ;;
x86_64) ARCH=i486 ;;
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 [ ! -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*"
@ -54,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.