wok-tiny view memtest/receipt @ rev 176

busybox: fix modules order
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 14 19:16:39 2021 +0000 (2021-07-14)
parents aacd5b54d010
children bbb34fe4904d
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 WEB_SITE="http://www.memtest.org/"
10 TARBALL="memtest86+-$VERSION.tar.gz"
11 WGET_URL="http://www.memtest.org/download/$VERSION/$TARBALL"
12 TARGET="i486"
14 BUILD_DEPENDS="xz"
16 tune_lzma()
17 {
18 cp $stuff/*.S $stuff/pack .
19 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
20 while [ -n "$2" ]; do
21 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
22 shift 2
23 done
24 for i in bootloader unpack ; do
25 cc -o $i.o -Wa,-a=$i.lst -c $i.S
26 objcopy -O binary $i.o $i.bin
27 done
28 ./pack --build bootloader.bin unpack.bin
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 ls $stuff/memtest*-$VERSION-*.patch 2> /dev/null &&
35 for i in $stuff/memtest*-$VERSION-*.patch ; do
36 patch -p1 < $i
37 done
38 make
39 tune_lzma 127,mf=bt2 PB 3
40 ./pack memtest.bin memtest.packed
41 mv memtest.bin memtest.bin.console
42 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \
43 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h
44 make clean
45 make
46 tune_lzma 172,mf=bt2 PB 3
47 ./pack memtest.bin memtest.packed-115200
48 mv memtest.bin memtest.bin.serial
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/boot
55 cp $src/memtest.packed $fs/boot/$PACKAGE
56 }
58 # Post install/remove commands for Tazpkg.
59 post_install()
60 {
61 grep -qs ^memtest $1/boot/bootmenu ||
62 echo "memtest Memtest,test,mem Check memory (may run under DOS, in real mode or with emm386, if renamed to memtest.exe)" >> $1/boot/bootmenu
63 }