wok view memtest/receipt @ rev 25463

Up expat (2.4.9) fixes CVE-2022-40674
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 29 20:05:23 2022 +0000 (19 months ago)
parents edba74bff784
children 2b776cc39d25
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="https://www.memtest.org/"
12 WGET_URL="${WEB_SITE}download/archives/$VERSION/$TARBALL"
14 BUILD_DEPENDS="xz"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - $WEB_SITE 2>/dev/null | \
20 sed '/tar.gz"/!d;s|.*memtest86.-||;s|.tar.*||;q'
21 }
23 tune_lzma()
24 {
25 cp $stuff/*.S $stuff/pack .
26 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
27 while [ -n "$2" ]; do
28 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
29 shift 2
30 done
31 for i in bootloader unpack ; do
32 cc -o $i.o -Wa,-a=$i.lst -c $i.S
33 objcopy --only-section=.text -O binary $i.o $i.bin
34 done
35 ./pack --build bootloader.bin unpack.bin
36 }
38 # Rules to configure and make the package.
39 compile_rules()
40 {
41 # binutils 2.37 support
42 sed -i 's|\t}|&\n\t/DISCARD/ : { *(*) }|' memtest.bin.lds
44 ls $stuff/memtest*-$VERSION-*.patch &&
45 for i in $stuff/memtest*-$VERSION-*.patch ; do
46 patch -p1 < $i
47 done
48 make
49 tune_lzma 218,mf=bt2 LC 2
50 ./pack memtest.bin memtest.packed
51 mv memtest.bin memtest.bin.console
52 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \
53 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h
54 make clean
55 make
56 tune_lzma 179,mf=bt3 LC 2
57 ./pack memtest.bin memtest.packed-115200
58 mv memtest.bin memtest.bin.serial
59 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 mkdir -p $fs/boot $install/usr/share/doc
66 cp $src/README* $install/usr/share/doc
67 cp $src/FAQ $install/usr/share/doc
68 cp $src/memtest.packed $fs/boot/memtest.exe
69 }
71 # Pre and post install commands for Tazpkg.
72 post_install()
73 {
74 [ -s $1/boot/isolinux/isolinux.cfg ] &&
75 ! grep -qs 'Check memory' $1/boot/isolinux/isolinux.cfg && sed -i \
76 's|LABEL md5|LABEL memtest mem ram\
77 MENU LABEL Check memory\
78 KERNEL /boot/memtest.exe\
79 \n&|' $1/boot/isolinux/isolinux.cfg
80 true
81 }