wok-6.x annotate memtest/receipt @ rev 24982
Update some wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 08 13:06:36 2022 +0000 (2022-05-08) |
parents | e7bde16e8f79 |
children | e171b422f9e7 |
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@24941 | 40 # binutils 2.37 support |
pascal@24941 | 41 sed -i 's|\t}|&\n\t/DISCARD/ : { *(*) }|' memtest.bin.lds |
pascal@24941 | 42 |
pascal@24043 | 43 ls $stuff/memtest*-$VERSION-*.patch && |
pascal@24043 | 44 for i in $stuff/memtest*-$VERSION-*.patch ; do |
pascal@24043 | 45 patch -p1 < $i |
pascal@17225 | 46 done |
pascal@1734 | 47 make |
pascal@24046 | 48 tune_lzma 218,mf=bt2 LC 2 |
pascal@13269 | 49 ./pack memtest.bin memtest.packed |
pascal@17227 | 50 mv memtest.bin memtest.bin.console |
pascal@14796 | 51 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ |
pascal@14796 | 52 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h |
pascal@14796 | 53 make clean |
pascal@14796 | 54 make |
pascal@24945 | 55 tune_lzma 179,mf=bt3 LC 2 |
pascal@14796 | 56 ./pack memtest.bin memtest.packed-115200 |
pascal@17227 | 57 mv memtest.bin memtest.bin.serial |
pascal@524 | 58 } |
pascal@524 | 59 |
pascal@524 | 60 |
pascal@524 | 61 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@524 | 62 genpkg_rules() |
pascal@524 | 63 { |
pascal@20042 | 64 mkdir -p $fs/boot $install/usr/share/doc |
pascal@20042 | 65 cp $src/README* $install/usr/share/doc |
pascal@20042 | 66 cp $src/FAQ $install/usr/share/doc |
pascal@20210 | 67 cp $src/memtest.packed $fs/boot/memtest.exe |
pascal@524 | 68 } |
pascal@20210 | 69 |
pascal@20210 | 70 # Pre and post install commands for Tazpkg. |
pascal@20210 | 71 post_install() |
pascal@20210 | 72 { |
pascal@20210 | 73 [ -s $1/boot/isolinux/isolinux.cfg ] && |
pascal@20210 | 74 ! grep -qs 'Check memory' $1/boot/isolinux/isolinux.cfg && sed -i \ |
pascal@20210 | 75 's|LABEL md5|LABEL memtest mem ram\ |
pascal@20210 | 76 MENU LABEL Check memory\ |
pascal@20210 | 77 KERNEL /boot/memtest.exe\ |
pascal@20210 | 78 \n&|' $1/boot/isolinux/isolinux.cfg |
pascal@20219 | 79 true |
pascal@20210 | 80 } |