wok-6.x view memtest/receipt @ rev 24477
updated dialog and dialog-dev (1.3_20210324 -> 1.3_20220117)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Feb 18 10:50:23 2022 +0100 (2022-02-18) |
parents | 8d938c826a9b |
children | 66a052ff61b1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="memtest"
4 VERSION="5.01"
5 CATEGORY="base-system"
6 SHORT_DESC="Memory failures detection tool."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="memtest86+"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.memtest.org/"
12 WGET_URL="${WEB_SITE}download/$VERSION/$TARBALL"
14 BUILD_DEPENDS="xz"
16 current_version()
17 {
18 wget -O - $WEB_SITE 2>/dev/null | \
19 sed '/tar.gz"/!d;s|.*memtest86.-||;s|.tar.*||;q'
20 }
22 tune_lzma()
23 {
24 cp $stuff/*.S $stuff/pack .
25 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
26 while [ -n "$2" ]; do
27 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
28 shift 2
29 done
30 for i in bootloader unpack ; do
31 cc -o $i.o -Wa,-a=$i.lst -c $i.S
32 objcopy -O binary $i.o $i.bin
33 done
34 ./pack --build bootloader.bin unpack.bin
35 }
37 # Rules to configure and make the package.
38 compile_rules()
39 {
40 ls $stuff/memtest*-$VERSION-*.patch &&
41 for i in $stuff/memtest*-$VERSION-*.patch ; do
42 patch -p1 < $i
43 done
44 make
45 tune_lzma 218,mf=bt2 LC 2
46 ./pack memtest.bin memtest.packed
47 mv memtest.bin memtest.bin.console
48 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \
49 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h
50 make clean
51 make
52 tune_lzma 179,mf=bt2 LC 2
53 ./pack memtest.bin memtest.packed-115200
54 mv memtest.bin memtest.bin.serial
55 }
58 # Rules to gen a SliTaz package suitable for Tazpkg.
59 genpkg_rules()
60 {
61 mkdir -p $fs/boot $install/usr/share/doc
62 cp $src/README* $install/usr/share/doc
63 cp $src/FAQ $install/usr/share/doc
64 cp $src/memtest.packed $fs/boot/memtest.exe
65 }
67 # Pre and post install commands for Tazpkg.
68 post_install()
69 {
70 [ -s $1/boot/isolinux/isolinux.cfg ] &&
71 ! grep -qs 'Check memory' $1/boot/isolinux/isolinux.cfg && sed -i \
72 's|LABEL md5|LABEL memtest mem ram\
73 MENU LABEL Check memory\
74 KERNEL /boot/memtest.exe\
75 \n&|' $1/boot/isolinux/isolinux.cfg
76 true
77 }