wok-tiny annotate 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 |
rev | line source |
---|---|
pascal@104 | 1 # SliTaz package receipt. |
pascal@104 | 2 |
pascal@104 | 3 PACKAGE="memtest" |
pascal@104 | 4 VERSION="5.01" |
pascal@104 | 5 CATEGORY="base-system" |
pascal@104 | 6 SHORT_DESC="Memory failures detection tool." |
pascal@104 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@104 | 8 LICENSE="GPL2" |
pascal@104 | 9 WEB_SITE="http://www.memtest.org/" |
pascal@168 | 10 TARBALL="memtest86+-$VERSION.tar.gz" |
pascal@168 | 11 WGET_URL="http://www.memtest.org/download/$VERSION/$TARBALL" |
pascal@104 | 12 TARGET="i486" |
pascal@104 | 13 |
pascal@168 | 14 BUILD_DEPENDS="xz" |
pascal@168 | 15 |
pascal@173 | 16 tune_lzma() |
pascal@173 | 17 { |
pascal@173 | 18 cp $stuff/*.S $stuff/pack . |
pascal@173 | 19 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack |
pascal@173 | 20 while [ -n "$2" ]; do |
pascal@173 | 21 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S |
pascal@173 | 22 shift 2 |
pascal@173 | 23 done |
pascal@173 | 24 for i in bootloader unpack ; do |
pascal@173 | 25 cc -o $i.o -Wa,-a=$i.lst -c $i.S |
pascal@173 | 26 objcopy -O binary $i.o $i.bin |
pascal@173 | 27 done |
pascal@173 | 28 ./pack --build bootloader.bin unpack.bin |
pascal@173 | 29 } |
pascal@173 | 30 |
pascal@168 | 31 # Rules to configure and make the package. |
pascal@168 | 32 compile_rules() |
pascal@168 | 33 { |
pascal@169 | 34 ls $stuff/memtest*-$VERSION-*.patch 2> /dev/null && |
pascal@168 | 35 for i in $stuff/memtest*-$VERSION-*.patch ; do |
pascal@168 | 36 patch -p1 < $i |
pascal@168 | 37 done |
pascal@168 | 38 make |
pascal@173 | 39 tune_lzma 127,mf=bt2 PB 3 |
pascal@168 | 40 ./pack memtest.bin memtest.packed |
pascal@173 | 41 mv memtest.bin memtest.bin.console |
pascal@173 | 42 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ |
pascal@173 | 43 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h |
pascal@173 | 44 make clean |
pascal@173 | 45 make |
pascal@173 | 46 tune_lzma 172,mf=bt2 PB 3 |
pascal@173 | 47 ./pack memtest.bin memtest.packed-115200 |
pascal@173 | 48 mv memtest.bin memtest.bin.serial |
pascal@168 | 49 } |
pascal@168 | 50 |
pascal@104 | 51 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@104 | 52 genpkg_rules() |
pascal@104 | 53 { |
pascal@104 | 54 mkdir -p $fs/boot |
pascal@168 | 55 cp $src/memtest.packed $fs/boot/$PACKAGE |
pascal@104 | 56 } |
pascal@153 | 57 |
pascal@153 | 58 # Post install/remove commands for Tazpkg. |
pascal@153 | 59 post_install() |
pascal@153 | 60 { |
pascal@153 | 61 grep -qs ^memtest $1/boot/bootmenu || |
pascal@154 | 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 |
pascal@153 | 63 } |