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